Commits

Mikhail Korobov  committed a6841ff Merge

Merged in syabro/django-vkontakte-iframe (pull request #6)

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

  • Participants
  • Parent commits ab7ea45, 973cf41

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