# HOTFIX: empty geometry save

* fixes a bug where the saving of an empty geometry could lead into a json decode error
This commit is contained in:
mpeltriaux 2025-12-03 13:38:13 +01:00
parent b7fac0ae03
commit 43eb598d3f

View File

@ -54,7 +54,7 @@ class SimpleGeomForm(BaseForm):
geom = json.dumps(geojson) geom = json.dumps(geojson)
except AttributeError: except AttributeError:
# If no geometry exists for this form, we simply set the value to None and zoom to the maximum level # If no geometry exists for this form, we simply set the value to None and zoom to the maximum level
geom = "" geom = json.dumps({})
self.empty = True self.empty = True
self.initialize_form_field("output", geom) self.initialize_form_field("output", geom)