Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Cloudmade geocoding throwing a 500 error when no query is entered

  • Loading branch information...
commit 03a6c8b95a2733d40c0ff1f7f75f9364bed4d14b 1 parent 45be262
@cnorthwood cnorthwood authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 molly/geolocation/providers/cloudmade.py
View
4 molly/geolocation/providers/cloudmade.py
@@ -47,6 +47,10 @@ def reverse_geocode(self, lon, lat):
}]
def geocode(self, query):
+
+ if not query:
+ return []
+
if self.search_locality and not (', ' in query or ' near ' in query):
query += ', %s' % self.search_locality
Please sign in to comment.
Something went wrong with that request. Please try again.