Commits

Daniel Greenfeld committed df0b489

Adding Google API key to help when you get blocked

Comments (0)

Files changed (1)

easy_maps/models.py

             self.geocode_error = True
             return
         try:
-            if hasattr(settings, "EASY_MAPS_GOOGLE_KEY"):
+            if hasattr(settings, "EASY_MAPS_GOOGLE_KEY") and settings.EASY_MAPS_GOOGLE_KEY:
                 g = geocoders.Google(settings.EASY_MAPS_GOOGLE_KEY)
             else:
                 g = geocoders.Google(resource='maps')