Skip to content

Commit

Permalink
Merge pull request #378 from specklesystems/main
Browse files Browse the repository at this point in the history
Main -> v3Dev
  • Loading branch information
JR-Morgan authored Jan 24, 2025
2 parents b9e4ee2 + 78c55b7 commit 826dadc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions src/speckle_automate/automation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,17 @@ def receive_version(self) -> Base:
commit = self.speckle_client.commit.get(
self.automation_run_data.project_id, version_id
)
if not commit.referencedObject:
raise ValueError("The commit has no referencedObject, cannot receive it.")
if not commit or not commit.referencedObject:
raise ValueError(
f"""\
Could not receive specified version.
{"The commit has no referencedObject." if not commit.referencedObject else ""}
Is your environment configured correctly?
project_id: {self.automation_run_data.project_id}
model_id: {self.automation_run_data.triggers[0].payload.model_id}
version_id: {self.automation_run_data.triggers[0].payload.version_id}
"""
)
base = operations.receive(
commit.referencedObject, self._server_transport, self._memory_transport
)
Expand Down
2 changes: 1 addition & 1 deletion src/specklepy/core/api/models/current.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Version(BaseModel):


class Model(BaseModel):
author: LimitedUser
author: Optional[LimitedUser]
createdAt: datetime
description: Optional[str]
displayName: str
Expand Down

0 comments on commit 826dadc

Please sign in to comment.