Skip to content

Commit

Permalink
add none check for non-file parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldesai1 committed Feb 14, 2024
1 parent 21a7af4 commit 6762b29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions latch_cli/snakemake/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,9 @@ def get_param_code(

if file_meta is None or file_meta.get(param) is None or is_primitive_type(t):
return dedent(f"""
print(f"Saving parameter value {param} = get_parameter_json_value({param})")
overwrite_config[{self._param_path_str(param_path)}] = get_parameter_json_value({param})
if {param} is not None:
print(f"Saving parameter value {param} = get_parameter_json_value({param})")
overwrite_config[{self._param_path_str(param_path)}] = get_parameter_json_value({param})
""")

if get_origin(t) is Annotated:
Expand Down

0 comments on commit 6762b29

Please sign in to comment.