Skip to content

Commit

Permalink
geolocation metadata return None if not set and not an empty dict
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Nov 20, 2024
1 parent cc71dc8 commit d6138b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Changelog
1.0.3 (unreleased)
------------------

- Nothing changed yet.

- geolocation metadata return None if not set and not an empty dict.
[cekk]

1.0.2 (2024-11-20)
------------------
Expand Down
2 changes: 1 addition & 1 deletion src/iosanita/contenttypes/indexers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def get_geolocation_data(context):
geolocation = getattr(context.aq_base, "geolocation", None)
if not geolocation:
return {}
return None
return {
"latitude": geolocation.latitude,
"longitude": geolocation.longitude,
Expand Down

0 comments on commit d6138b6

Please sign in to comment.