Skip to content

Commit

Permalink
Fix optional check
Browse files Browse the repository at this point in the history
  • Loading branch information
schustmi committed Dec 13, 2024
1 parent 3cc6e8a commit 9ca694d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/zenml/zen_stores/schemas/pipeline_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,11 @@ def to_model(

resources = None
if include_resources:
latest_run_user = self.runs[-1].user if self.runs else None

resources = PipelineResponseResources(
latest_run_user=self.runs[-1].user.to_model()
if self.runs
latest_run_user=latest_run_user.to_model()
if latest_run_user
else None,
tags=[t.tag.to_model() for t in self.tags],
)
Expand Down

0 comments on commit 9ca694d

Please sign in to comment.