TypeError when spatial is missing

This commit is contained in:
Sergey Motornyuk 2023-01-31 12:07:11 +02:00
parent 9d9bc23695
commit 20d63d3a94
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@ class SpatialSearchBackend:
"""Base class for all datastore backends."""
def parse_geojson(self, geom_from_metadata):
if not geom_from_metadata:
log.error("Metadata does not contain geometry, not indexing")
return None
try:
geometry = json.loads(geom_from_metadata)