Skip to content
Snippets Groups Projects
Commit 7326ec76 authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Fix passing boolean false parameters from the webservice

parent d5e2d06a
No related branches found
No related tags found
1 merge request!1117[Webservice] Fix passing boolean false parameters to xfel-calibrate
...@@ -333,8 +333,7 @@ def parse_config(cmd: List[str], config: Dict[str, Any]) -> List[str]: ...@@ -333,8 +333,7 @@ def parse_config(cmd: List[str], config: Dict[str, Any]) -> List[str]:
cmd.append(f"--{key}") cmd.append(f"--{key}")
cmd += [str(v) for v in value] cmd += [str(v) for v in value]
elif isinstance(value, bool): elif isinstance(value, bool):
if value: cmd.append(f"--{key}" if value else f"--no-{key}")
cmd += ["--{}".format(key)]
else: else:
if value in ['""', "''"]: if value in ['""', "''"]:
value = "" value = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment