Skip to content

Commit 62e3944

Browse files
committed
fixed argstr for output_file_template with union[str, bool] type
1 parent fb2b997 commit 62e3944

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pydra/engine/helpers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,11 @@ def argstr_formatting(argstr, inputs, value_updates=None):
652652
for fld in inp_fields:
653653
fld_name = fld[1:-1] # extracting the name form {field_name}
654654
fld_value = inputs_dict[fld_name]
655-
if fld_value is attr.NOTHING:
655+
fld_attr = getattr(attrs.fields(type(inputs)), fld_name)
656+
if fld_value is attr.NOTHING or (
657+
fld_value is False
658+
and TypeParser.matches_type(fld_attr.type, ty.Union[Path, bool])
659+
):
656660
# if value is NOTHING, nothing should be added to the command
657661
val_dict[fld_name] = ""
658662
else:

0 commit comments

Comments
 (0)