Hopefully fix ContentType problem hit during 2.4 -> 3.0 upgrade migration

#1380
This commit is contained in:
Akita Noek 2016-04-01 15:18:48 -04:00
parent 4882bef180
commit 28acc9516d

View File

@ -1,6 +1,5 @@
import logging
from django.contrib.contenttypes.models import ContentType
from django.utils.encoding import smart_text
from django.db.models import Q
@ -31,6 +30,7 @@ def migrate_users(apps, schema_editor):
User = apps.get_model('auth', "User")
Role = apps.get_model('main', "Role")
RolePermission = apps.get_model('main', "RolePermission")
ContentType = apps.get_model('contenttypes', "ContentType")
for user in User.objects.iterator():
try: