Skip to content

Commit

Permalink
Merge pull request #96 from geopython/dev
Browse files Browse the repository at this point in the history
#95 prevent Null coordinates inserted in DB, make 0,0
  • Loading branch information
justb4 authored May 3, 2017
2 parents d1d15b9 + 7a23ebb commit e35c5ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GeoHealthCheck/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ def __init__(self, owner, resource_type, title, url, tags):
self.latitude, self.longitude = util.geocode(url)
except Exception as err: # skip storage
LOGGER.exception('Could not derive coordinates: %s', err)
self.latitude = 0.0
self.longitude = 0.0

def __repr__(self):
return '<Resource %r %r>' % (self.identifier, self.title)
Expand Down

0 comments on commit e35c5ec

Please sign in to comment.