From e04b849de21582bdffd17d30c7490a0fd78c3130 Mon Sep 17 00:00:00 2001 From: Marcel Wallschlaeger Date: Mon, 6 May 2024 10:11:49 +0200 Subject: [PATCH] [Fixes #20] add user create function --- geonoderest/geonodeobject.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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: