Skip to content

Commit 7894d0b

Browse files
committed
FIX: Only check for self.input_spec if not in state
1 parent 60b062d commit 7894d0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pydra/engine/core.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ def __setstate__(self, state):
217217
state["input_spec"] = cp.loads(state["input_spec"])
218218
if "output_spec" in state:
219219
state["output_spec"] = cp.loads(state["output_spec"])
220-
input_spec = state.get("input_spec", getattr(self, "input_spec", None))
220+
input_spec = state.get("input_spec")
221+
if input_spec is None: # If it is not saved, it should be a class attribute
222+
input_spec = self.input_spec
221223
state["inputs"] = make_klass(input_spec)(**state["inputs"])
222224
self.__dict__.update(state)
223225

0 commit comments

Comments
 (0)