diff --git a/application/core/filters.py b/application/core/filters.py index 25018c39..ccf75e15 100644 --- a/application/core/filters.py +++ b/application/core/filters.py @@ -269,9 +269,15 @@ def make_link_filter(eval_ctx, url, **kwargs): def get_entity_geometry(entity): + data = entity.geojson.geometry if entity.geojson else None + if data is None: + logger.warning( + f"No geojson for entity that has a typology of geography: {entity.entity}", + entity, + ) return { "name": get_entity_name(entity), - "data": entity.geojson.geometry if entity.geojson is not None else None, + "data": data, "entity": entity.entity, }