diff --git a/api/tasks/mail_human_input_delivery_task.py b/api/tasks/mail_human_input_delivery_task.py index 80b82302e0..a6ec28bff6 100644 --- a/api/tasks/mail_human_input_delivery_task.py +++ b/api/tasks/mail_human_input_delivery_task.py @@ -48,7 +48,7 @@ def _build_form_link(token: str | None) -> str | None: base_url = dify_config.CONSOLE_WEB_URL if not base_url: return None - return f"{base_url.rstrip('/')}/api/form/human_input/{token}" + return f"{base_url.rstrip('/')}/form/{token}" def _parse_recipient_payload(payload: str) -> tuple[str | None, RecipientType | None]: diff --git a/api/tests/test_containers_integration_tests/tasks/test_mail_human_input_delivery_task.py b/api/tests/test_containers_integration_tests/tasks/test_mail_human_input_delivery_task.py index adb9de9c25..a4af4146a3 100644 --- a/api/tests/test_containers_integration_tests/tasks/test_mail_human_input_delivery_task.py +++ b/api/tests/test_containers_integration_tests/tasks/test_mail_human_input_delivery_task.py @@ -88,7 +88,7 @@ def _build_form(db_session_with_containers, tenant, account): engine = db_session_with_containers.get_bind() repo = HumanInputFormRepositoryImpl(session_factory=engine, tenant_id=tenant.id) params = FormCreateParams( - app_id="app-1", + app_id=str(uuid.uuid4()), workflow_execution_id=str(uuid.uuid4()), node_id="node-1", form_config=node_data, @@ -115,4 +115,4 @@ def test_dispatch_human_input_email_task_integration(monkeypatch: pytest.MonkeyP send_args = [call.kwargs for call in mock_mail.send.call_args_list] recipients = {kwargs["to"] for kwargs in send_args} assert recipients == {"owner@example.com", "external@example.com"} - assert all("console.example.com/api/form/human_input/" in kwargs["html"] for kwargs in send_args) + assert all("console.example.com/form/" in kwargs["html"] for kwargs in send_args)