Commits

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

Comments (0)

Files changed (1)

File vk_iframe/backends.py

                 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