Commits

Maxim Syabro committed 973cf41

Fixed exception "The database backend does not accept 0 as a value for AutoField."

  • Participants
  • Parent commits e617c3e

Comments (0)

Files changed (1)

File vk_iframe/backends.py

             user_profile.country = country
 
         city_id = vk_profile.get('city', None)
-        if city_id:
+        if city_id and city_id!=u'0':
             city, created = City.objects.get_or_create(id=city_id, defaults={'country_id': country_id})
             user_profile.city = city