Merge pull request '#138 Bugfix' (#167) from 138_New_map_client into master

Reviewed-on: SGD-Nord/konova#167
This commit is contained in:
mpeltriaux 2022-05-27 15:02:05 +02:00
commit fbab67f897

View File

@ -311,6 +311,9 @@ class SimpleGeomForm(BaseForm):
# Get geojson from form # Get geojson from form
geom = self.data["geom"] geom = self.data["geom"]
if geom is None or len(geom) == 0:
# empty geometry is a valid geometry
return is_valid
geom = json.loads(geom) geom = json.loads(geom)
# Write submitted data back into form field to make sure invalid geometry # Write submitted data back into form field to make sure invalid geometry