diff --git a/geonoderest/geonodeobject.py b/geonoderest/geonodeobject.py index 5cf56ed..4ed0233 100644 --- a/geonoderest/geonodeobject.py +++ b/geonoderest/geonodeobject.py @@ -73,13 +73,12 @@ def cmd_patch( if json_path: with open(json_path, "r") as file: try: - j_dict = json.load(file) + json_content = json.load(file) except json.decoder.JSONDecodeError as E: json_decode_error_handler(str(file), E) - if "attribute_set" in j_dict: - j_dict.pop("attribute_set", None) - json_content = {**json_content, **j_dict} + if "attribute_set" in json_content: + json_content.pop("attribute_set", None) if fields: try: