Skip to content

Commit 5e8da87

Browse files
committed
set mandatory to False when there is a valid default
1 parent caee1bc commit 5e8da87

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nipype2pydra/interface/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,8 @@ def pydra_fld_input(self, field, nm):
539539
if val is not None:
540540
if key == "argstr" and "%" in val:
541541
val = self.string_formats(argstr=val, name=nm)
542+
elif key == "mandatory" and pydra_default is not None:
543+
val = False # Overwrite mandatory to False if default is provided
542544
pydra_metadata[pydra_key_nm] = val
543545

544546
if getattr(field, "name_template"):

0 commit comments

Comments
 (0)