From 606f1ed311646591589c39a8a6e594f11c7ef6e0 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 15 Sep 2026 18:01:35 +0200 Subject: [PATCH] # Bugfix * fixes bug where empty geometry on SimpleGeomForm could lead to error --- konova/utils/geometry/geometry_validator.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/konova/utils/geometry/geometry_validator.py b/konova/utils/geometry/geometry_validator.py index 15fbd43a..a5af9f24 100644 --- a/konova/utils/geometry/geometry_validator.py +++ b/konova/utils/geometry/geometry_validator.py @@ -257,10 +257,10 @@ class GeoJsonValidator: Returns: """ - features = self._input_geojson.get("features", None) + features = self._input_geojson.get("features", []) 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: # check if _input_geojson is a feature itself @@ -273,7 +273,6 @@ class GeoJsonValidator: else: self.__add_error("Input does not seem to be geojson") return - try: validated_features = self.__validate_single_features(features) except AssertionError as e: -- 2.52.0