diff --git a/zont-exporter/zont_exporter.py b/zont-exporter/zont_exporter.py index de7ad51..4c8aad6 100644 --- a/zont-exporter/zont_exporter.py +++ b/zont-exporter/zont_exporter.py @@ -519,10 +519,13 @@ def collect_events(did): 'type_ru': type_ru, 'alarm': bool(is_alarm), 'description': description, - 'lat': lat, - 'lon': lon, - 'duration': duration, } + if lat is not None: + log_obj['lat'] = lat + if lon is not None: + log_obj['lon'] = lon + if duration is not None: + log_obj['duration'] = duration line = json.dumps(log_obj, ensure_ascii=False) labels = {