Skip to content

Commit

Permalink
Update cities.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sowinski authored Oct 30, 2018
1 parent 26f7833 commit 5ec8111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cities/management/commands/cities.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def import_district(self):
).annotate(
distance=Distance('location', defaults['location'])
).order_by('distance').first()
except City.DoesNotExist as e:
except (City.DoesNotExist, ValueError) as e:
self.logger.warning(
"District: %s: DB backend does not support native '.distance(...)' query "
"falling back to two degree search",
Expand Down

0 comments on commit 5ec8111

Please sign in to comment.