Do not store "Unknown Location" in the location.json database. #203 (#208)

This commit is contained in:
Jaisen Mathai 2017-04-08 02:10:55 +05:30 committed by GitHub
parent 8082b739af
commit 6777c32588
1 changed files with 4 additions and 3 deletions

View File

@ -147,13 +147,14 @@ def place_name(lat, lon):
if('default' not in lookup_place_name):
lookup_place_name['default'] = address[loc]
if('default' not in lookup_place_name):
lookup_place_name = lookup_place_name_default
if(lookup_place_name is not {}):
db.add_location(lat, lon, lookup_place_name)
# TODO: Maybe this should only be done on exit and not for every write.
db.update_location_db()
if('default' not in lookup_place_name):
lookup_place_name = lookup_place_name_default
return lookup_place_name