Permalink
Browse files

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

  • Loading branch information...
1 parent 45be262 commit 03a6c8b95a2733d40c0ff1f7f75f9364bed4d14b @cnorthwood cnorthwood committed Jul 8, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 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

0 comments on commit 03a6c8b

Please sign in to comment.