From d6138b6f2f06ef8015c1777c7261fb8659849945 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Wed, 20 Nov 2024 12:51:45 +0100 Subject: [PATCH] geolocation metadata return None if not set and not an empty dict --- CHANGES.rst | 4 ++-- src/iosanita/contenttypes/indexers/common.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 29ad399..39ed212 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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) ------------------ diff --git a/src/iosanita/contenttypes/indexers/common.py b/src/iosanita/contenttypes/indexers/common.py index 4cb4bdd..ec57916 100644 --- a/src/iosanita/contenttypes/indexers/common.py +++ b/src/iosanita/contenttypes/indexers/common.py @@ -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,