From 61f87ed8622812a9b0a3078aa29884d616bfb0cc Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Fri, 20 May 2022 18:22:51 +0200 Subject: [PATCH] Avoid that deleting "type" modifies the original json when creating a map. --- wrpylib/wrmwmarkup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrpylib/wrmwmarkup.py b/wrpylib/wrmwmarkup.py index 91d876d..7ac2c98 100644 --- a/wrpylib/wrmwmarkup.py +++ b/wrpylib/wrmwmarkup.py @@ -340,7 +340,7 @@ def create_wrmap(geojson: Dict) -> str: last_json_feature.tail = '\n\n' feature_xml.text = '\n' + create_wrmap_coordinates(geo['coordinates']) + '\n' last_json_feature = feature_xml - feature_xml.attrib = json_feature['properties'] + feature_xml.attrib = json_feature['properties'].copy() del feature_xml.attrib['type'] if last_json_feature is not None: -- 2.39.5