Commits

Jakub Zalewski committed 952af57

Empty address check fix, checking against empty string raised an exception when trying to render map on model creation form (None).

Comments (0)

Files changed (1)

easy_maps/templatetags/easy_maps_tags.py

         if isinstance(address, Address):
             return address
 
-        if address == '':
+        if not address:
             map_ = Address(latitude=settings.EASY_MAPS_CENTER[0],
                            longitude=settings.EASY_MAPS_CENTER[1])
         else: