diff --git a/src/speckle_automate/automation_context.py b/src/speckle_automate/automation_context.py index b3cecb2e..3e5f48eb 100644 --- a/src/speckle_automate/automation_context.py +++ b/src/speckle_automate/automation_context.py @@ -183,8 +183,8 @@ def set_context_view( "We do not have enough resource ids to compose a context view" ) self._automation_result.result_view = ( - f"{self.automation_run_data.speckle_server_url}/projects" - f"/{self.automation_run_data.project_id}/models/{','.join(link_resources)}" + f"/projects/{self.automation_run_data.project_id}" + f"/models/{','.join(link_resources)}" ) def report_run_status(self) -> None: diff --git a/tests/intergration/speckle_automate/test_automation_context.py b/tests/intergration/speckle_automate/test_automation_context.py index 42323c53..5f48ced3 100644 --- a/tests/intergration/speckle_automate/test_automation_context.py +++ b/tests/intergration/speckle_automate/test_automation_context.py @@ -260,6 +260,8 @@ def test_set_context_view(automation_context: AutomationContext) -> None: f"models/{automation_context.automation_run_data.model_id}@{automation_context.automation_run_data.version_id}" ) + automation_context.report_run_status() + automation_context._automation_result.result_view = None dummy_context = "foo@bar" @@ -269,6 +271,8 @@ def test_set_context_view(automation_context: AutomationContext) -> None: assert automation_context._automation_result.result_view.endswith( f"models/{automation_context.automation_run_data.model_id}@{automation_context.automation_run_data.version_id},{dummy_context}" ) + automation_context.report_run_status() + automation_context._automation_result.result_view = None dummy_context = "foo@baz" @@ -280,3 +284,4 @@ def test_set_context_view(automation_context: AutomationContext) -> None: assert automation_context._automation_result.result_view.endswith( f"models/{dummy_context}" ) + automation_context.report_run_status()