Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7fe5340995 | |||
| 606f1ed311 |
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user