Skip to content

Commit

Permalink
fix: make __make_reference__ pass workflow if none
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Aug 25, 2024
1 parent 33874a3 commit 3ec7e39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dewret/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,8 @@ def __eq__(self, other: object) -> bool:

def __make_reference__(self, **kwargs: Any) -> "ParameterReference[U]":
"""Get a reference for the same parameter."""
if "workflow" not in kwargs:
kwargs["workflow"] = self.__workflow__
return self._.parameter.make_reference(**kwargs)

class IterableParameterReference(IterableMixin[U], ParameterReference[U]):
Expand Down Expand Up @@ -1588,6 +1590,8 @@ def __workflow__(self, workflow: Workflow) -> None:

def __make_reference__(self, **kwargs: Any) -> "StepReference[U]":
"""Create a new reference for the same step."""
if "workflow" not in kwargs:
kwargs["workflow"] = self.__workflow__
return self._.step.make_reference(**kwargs)

class IterableStepReference(IterableMixin[U], StepReference[U]):
Expand Down

0 comments on commit 3ec7e39

Please sign in to comment.