1. Jakub Zalewski
  2. django-easy-maps

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).

  • Participants
  • Parent commits 473a134
  • Branches default

Comments (0)

Files changed (1)

File easy_maps/templatetags/easy_maps_tags.py

View file
         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: