Skip to content

Commit

Permalink
FIX: Only check for self.input_spec if not in state
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Mar 2, 2021
1 parent 60b062d commit 7894d0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pydra/engine/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ def __setstate__(self, state):
state["input_spec"] = cp.loads(state["input_spec"])
if "output_spec" in state:
state["output_spec"] = cp.loads(state["output_spec"])
input_spec = state.get("input_spec", getattr(self, "input_spec", None))
input_spec = state.get("input_spec")
if input_spec is None: # If it is not saved, it should be a class attribute
input_spec = self.input_spec
state["inputs"] = make_klass(input_spec)(**state["inputs"])
self.__dict__.update(state)

Expand Down

0 comments on commit 7894d0b

Please sign in to comment.