Compare commits

..

3 Commits

Author SHA1 Message Date
Gergő Jedlicska 37c09fa56c Merge pull request #311 from specklesystems/gergo/contextView
fix: automate sdk context view is a realative url
2023-10-26 15:38:50 +02:00
Gergő Jedlicska cbae4d300d Merge branch 'main' into gergo/contextView 2023-10-26 15:36:30 +02:00
Gergő Jedlicska 2742c12e31 fix: automate sdk context view is a realative url 2023-10-26 15:35:39 +02:00
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -183,8 +183,8 @@ class AutomationContext:
"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:
@@ -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()