From e94e5c6064c4b0df1a4cd09ddb9a0b8d30c75612 Mon Sep 17 00:00:00 2001 From: Zach Aysan Date: Mon, 16 Dec 2024 08:49:40 -0500 Subject: [PATCH] fix: Set project change requests url (#4920) --- api/features/workflows/core/models.py | 2 +- .../features/workflows/core/test_unit_workflows_models.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/features/workflows/core/models.py b/api/features/workflows/core/models.py index 3d1c99bf9d27..f5c5da2f9d00 100644 --- a/api/features/workflows/core/models.py +++ b/api/features/workflows/core/models.py @@ -277,7 +277,7 @@ def url(self): url += f"/project/{self.environment.project_id}" url += f"/environment/{self.environment.api_key}" else: - url += f"/projects/{self.project_id}" + url += f"/project/{self.project_id}" url += f"/change-requests/{self.id}" return url diff --git a/api/tests/unit/features/workflows/core/test_unit_workflows_models.py b/api/tests/unit/features/workflows/core/test_unit_workflows_models.py index 37edd3e7059a..18c8d185b229 100644 --- a/api/tests/unit/features/workflows/core/test_unit_workflows_models.py +++ b/api/tests/unit/features/workflows/core/test_unit_workflows_models.py @@ -1001,7 +1001,5 @@ def test_url_via_project(project_change_request: ChangeRequest) -> None: # Then project_id = project_change_request.project_id expected_url = get_current_site_url() - expected_url += ( - f"/projects/{project_id}/change-requests/{project_change_request.id}" - ) + expected_url += f"/project/{project_id}/change-requests/{project_change_request.id}" assert url == expected_url