From c4c790b0d6be949d86876ee92edc39aaf6dcee67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Mon, 9 Oct 2023 10:49:41 +0200 Subject: [PATCH] Delete geo-Data if lat/lon is missing #502 Pelias seem to provide only one geodata info. --- conf/fix-enriched.fix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf/fix-enriched.fix b/conf/fix-enriched.fix index d725838..e749fe5 100644 --- a/conf/fix-enriched.fix +++ b/conf/fix-enriched.fix @@ -290,6 +290,16 @@ elsif exists("@geoLookupDbs") copy_field("@geoLookupDbsLon","@visitorLocation.geo.lon") end +# Workaround for failing pelias lookups + +unless exists("@visitorLocation.geo.lon") + remove_field("@visitorLocation.geo") +end + +unless exists("@visitorLocation.geo.lat") + remove_field("@visitorLocation.geo") +end + if exists("@visitorLocation") add_field("@visitorLocation.type","Place") end