From 586bd2fcf549fc412a1ac6e48f9ef5237402fbf8 Mon Sep 17 00:00:00 2001 From: romjerome Date: Thu, 8 Oct 2015 17:12:49 +0200 Subject: [PATCH] [Geography] Ignore places without hierarchy Cannot get value if there is no levels See country = state = county set on self.get_location() --- gramps/plugins/lib/maps/placeselection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gramps/plugins/lib/maps/placeselection.py b/gramps/plugins/lib/maps/placeselection.py index 56f6b899d..cbc1850b6 100644 --- a/gramps/plugins/lib/maps/placeselection.py +++ b/gramps/plugins/lib/maps/placeselection.py @@ -194,6 +194,9 @@ class PlaceSelection(ManagedWindow, OsmGps): self.oldvalue) ) for place in self.places: + if place[0] == '': + _LOG.info('No hierarchy yet: %s' % place) + continue p = (place[0].value, place[1], place[2], place[3]) self.plist.append(p) # here, we could add value from geography names services ...