Skip to content

Commit

Permalink
added logging if the entity doesn't have a geojson
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Jan 24, 2024
1 parent db24432 commit c712d5b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion application/core/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down

0 comments on commit c712d5b

Please sign in to comment.