From a6790c7c7014b0cc09f4d8168967997c1405b554 Mon Sep 17 00:00:00 2001 From: Chuck Driesler Date: Tue, 26 Aug 2025 15:27:13 +0100 Subject: [PATCH] feat(automate): return blob id from file results (#445) --- src/speckle_automate/automation_context.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/speckle_automate/automation_context.py b/src/speckle_automate/automation_context.py index f2b2b09..cfead4b 100644 --- a/src/speckle_automate/automation_context.py +++ b/src/speckle_automate/automation_context.py @@ -268,7 +268,7 @@ class AutomationContext: print(f"Reporting run status with content: {params}") self.speckle_client.httpclient.execute(query, params) - def store_file_result(self, file_path: Union[Path, str]) -> None: + def store_file_result(self, file_path: Union[Path, str]) -> str: """Save a file attached to the project of this automation.""" path_obj = ( Path(file_path).resolve() if isinstance(file_path, str) else file_path @@ -310,6 +310,8 @@ class AutomationContext: [upload_result.blob_id for upload_result in upload_response.upload_results] ) + return upload_response.upload_results[0].blob_id + def mark_run_failed(self, status_message: str) -> None: """Mark the current run a failure.""" self._mark_run(AutomationStatus.FAILED, status_message)