Compare commits

...

2 Commits

Author SHA1 Message Date
mpeltriaux 7fe5340995 Merge pull request '# Bugfix' (#588) from bugfix_empty_geometry_error into master
Reviewed-on: #588
2026-09-15 18:02:35 +02:00
mpeltriaux 606f1ed311 # Bugfix
* fixes bug where empty geometry on SimpleGeomForm could lead to error
2026-09-15 18:01:35 +02:00
+2 -3
View File
@@ -257,10 +257,10 @@ class GeoJsonValidator:
Returns: Returns:
""" """
features = self._input_geojson.get("features", None) features = self._input_geojson.get("features", [])
is_input_geojson_empty = len(self._input_geojson) == 0 is_input_geojson_empty = len(self._input_geojson) == 0
no_features_in_input_found = features is None no_features_in_input_found = len(features) == 0
if not is_input_geojson_empty and no_features_in_input_found: if not is_input_geojson_empty and no_features_in_input_found:
# check if _input_geojson is a feature itself # check if _input_geojson is a feature itself
@@ -273,7 +273,6 @@ class GeoJsonValidator:
else: else:
self.__add_error("Input does not seem to be geojson") self.__add_error("Input does not seem to be geojson")
return return
try: try:
validated_features = self.__validate_single_features(features) validated_features = self.__validate_single_features(features)
except AssertionError as e: except AssertionError as e: