Skip to content

Commit

Permalink
simplify return value of handle_merge
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Milton <[email protected]>
  • Loading branch information
DrLachie and multimeric authored Aug 28, 2024
1 parent 3331595 commit 584b2cd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/lls_core/cmds/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ def field_from_model(model: Type[FieldAccessModel], field_name: str, extra_descr
def handle_merge(values: list):
if len(values) > 1:
if all(isinstance(param, dict) for param in values):
merged = merge_with(handle_merge,values)
values = [merged]
return merge_with(handle_merge, values)
else:
raise ValueError(f"A parameter has been passed multiple times! Got: {', '.join(values)}")
return values[0]
Expand Down

0 comments on commit 584b2cd

Please sign in to comment.