1. Mikhail Korobov
  2. django-vkontakte-iframe


Maxim Syabro  committed 8a9cc29

Fixed The database backend does not accept 0 as a value for AutoField. if country is empty

  • Participants
  • Parent commits 973cf41
  • Branches default

Comments (0)

Files changed (1)

File vk_iframe/backends.py

View file
  • Ignore whitespace
                 setattr(user_profile, key, vk_profile[key])
         country_id = vk_profile.get('country', None)
-        if country_id:
+        if country_id and country_id!=u'0':
             country, created = Country.objects.get_or_create(id=country_id)
             user_profile.country = country