Skip to content

Commit 3219549

Browse files
committed
deep copy original inputs when saving to restore after task has been run
1 parent 5f5044d commit 3219549

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pydra/engine/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ def __call__(
454454

455455
def _modify_inputs(self):
456456
"""Update and preserve a Task's original inputs"""
457-
orig_inputs = attr.asdict(self.inputs, recurse=False)
457+
orig_inputs = {
458+
k: deepcopy(v) for k, v in attr.asdict(self.inputs, recurse=False).items()
459+
}
458460
map_copyfiles = copyfile_input(self.inputs, self.output_dir)
459461
modified_inputs = template_update(
460462
self.inputs, self.output_dir, map_copyfiles=map_copyfiles

0 commit comments

Comments
 (0)