[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:18:00 +02:00
parent 448ddfd721
commit f5598a2c0f

View File

@ -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 ...