Skip to content

Commit

Permalink
Merge pull request #311 from specklesystems/gergo/contextView
Browse files Browse the repository at this point in the history
fix: automate sdk context view is a realative url
  • Loading branch information
gjedlicska authored Oct 26, 2023
2 parents 6dd0813 + cbae4d3 commit 37c09fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/speckle_automate/automation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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()

0 comments on commit 37c09fa

Please sign in to comment.