Skip to content

Commit

Permalink
Delete geo-Data if lat/lon is missing #502
Browse files Browse the repository at this point in the history
Pelias seem to provide only one geodata info.
TobiasNx committed Oct 9, 2023
1 parent aba7538 commit c4c790b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions conf/fix-enriched.fix
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c4c790b

Please sign in to comment.