Commit 2b447a82 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

mutliple param ok

parent 38cfb5e3
......@@ -197,7 +197,7 @@ class AbstractParameter(object):
else: self.display_name = display_name
self.required = required
self.choices = choices
if type == "date":
self.type = date
elif type == "multiple":
......@@ -215,6 +215,8 @@ class AbstractParameter(object):
elif self.type == types.BooleanType :
if self.default: self.default = str(self.default).lower() in ("true", "t", "1")
else: self.default = True
elif self.action == "append":
self.default = []
def export_to_argparse(self):
if self.type == types.BooleanType and str(self.default).lower() in ("false", "f", "0"):
......
......@@ -125,7 +125,6 @@ class Workflow(threading.Thread):
new_param = InputFileList(name, help, flag=flag, file_format=file_format, default=default, type=type,
choices=choices, required=required, group=group, display_name=display_name)
else:
if default == None: default = ""
new_param = InputFile(name, help, flag=flag, file_format=file_format, default=default, type=type,
choices=choices, required=required, group=group, display_name=display_name)
# if this input should be added to a particular parameter
......@@ -145,7 +144,6 @@ class Workflow(threading.Thread):
new_param = OutputFileList(name, help, flag=flag, file_format=file_format, default=default, type=type,
choices=choices, required=required, group=group, display_name=display_name)
else:
if default == None: default = ""
new_param = OutputFile(name, help, flag=flag, file_format=file_format, default=default, type=type,
choices=choices, required=required, group=group, display_name=display_name)
# if this input should be added to a particular parameter
......@@ -173,7 +171,6 @@ class Workflow(threading.Thread):
new_param = ParameterList(name, help, flag=flag, default=default, type=type, choices=choices,
required=required, group=group, display_name=display_name)
else:
if default == None: default = ""
new_param = Parameter(name, help, flag=flag, default=default, type=type, choices=choices,
required=required, group=group, display_name=display_name)
# if this input should be added to a particular parameter
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment