From f5598a2c0f450cf3cd88b5ac0d132da4e5dde438 Mon Sep 17 00:00:00 2001 From: romjerome Date: Thu, 8 Oct 2015 17:18:00 +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 4138662eb..3bfb6fb19 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 not 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 ...