From 584b2cdd647ed0f0b0ed1e79e2b9c4a59402f637 Mon Sep 17 00:00:00 2001 From: Lachie Date: Wed, 28 Aug 2024 21:00:34 +1000 Subject: [PATCH] simplify return value of handle_merge Co-authored-by: Michael Milton --- core/lls_core/cmds/__main__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/lls_core/cmds/__main__.py b/core/lls_core/cmds/__main__.py index 4b18f74e..c5560d3d 100644 --- a/core/lls_core/cmds/__main__.py +++ b/core/lls_core/cmds/__main__.py @@ -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]