From 3ec7e394cb5ce58c6dc28e3ca4b06e5784a03f4b Mon Sep 17 00:00:00 2001 From: Phil Weir Date: Sun, 25 Aug 2024 03:32:43 +0100 Subject: [PATCH] fix: make __make_reference__ pass workflow if none --- src/dewret/workflow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dewret/workflow.py b/src/dewret/workflow.py index 7b2bb2b2..81ba3914 100644 --- a/src/dewret/workflow.py +++ b/src/dewret/workflow.py @@ -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]): @@ -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]):