Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 89280acf53 | |||
| 78c55b787f | |||
| 34f2dc2ab6 |
@@ -101,8 +101,17 @@ class AutomationContext:
|
||||
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
|
||||
)
|
||||
|
||||
@@ -22,10 +22,10 @@ class TestAutomationEnvironment(BaseSettings):
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
token: str = Field()
|
||||
server_url: str = Field()
|
||||
project_id: str = Field()
|
||||
automation_id: str = Field()
|
||||
token: str = Field(default="")
|
||||
server_url: str = Field(default="")
|
||||
project_id: str = Field(default="")
|
||||
automation_id: str = Field(default="")
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
|
||||
@@ -126,7 +126,7 @@ class Version(BaseModel):
|
||||
|
||||
|
||||
class Model(BaseModel):
|
||||
author: LimitedUser
|
||||
author: Optional[LimitedUser]
|
||||
createdAt: datetime
|
||||
description: Optional[str]
|
||||
displayName: str
|
||||
|
||||
Reference in New Issue
Block a user