mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Hopefully fix ContentType problem hit during 2.4 -> 3.0 upgrade migration
#1380
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.contrib.contenttypes.models import ContentType
|
|
||||||
from django.utils.encoding import smart_text
|
from django.utils.encoding import smart_text
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
|
||||||
@@ -31,6 +30,7 @@ def migrate_users(apps, schema_editor):
|
|||||||
User = apps.get_model('auth', "User")
|
User = apps.get_model('auth', "User")
|
||||||
Role = apps.get_model('main', "Role")
|
Role = apps.get_model('main', "Role")
|
||||||
RolePermission = apps.get_model('main', "RolePermission")
|
RolePermission = apps.get_model('main', "RolePermission")
|
||||||
|
ContentType = apps.get_model('contenttypes', "ContentType")
|
||||||
|
|
||||||
for user in User.objects.iterator():
|
for user in User.objects.iterator():
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user