[Geography] Ignore places without hierarchy

Cannot get value if there is no levels

See country = state = county set on self.get_location()
This commit is contained in:
romjerome 2015-10-08 17:12:49 +02:00
parent f7e8b90d60
commit 586bd2fcf5

View File

@ -194,6 +194,9 @@ class PlaceSelection(ManagedWindow, OsmGps):
self.oldvalue) self.oldvalue)
) )
for place in self.places: 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]) p = (place[0].value, place[1], place[2], place[3])
self.plist.append(p) self.plist.append(p)
# here, we could add value from geography names services ... # here, we could add value from geography names services ...