Skip to content

Commit

Permalink
Fix: do not use current apps in migrations (#15839)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding authored Feb 19, 2025
1 parent 8145de3 commit 3495c42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions awx/main/migrations/_OrgAdmin_to_use_ig.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import logging

from awx.main.models import Organization

logger = logging.getLogger('awx.main.migrations')


def migrate_org_admin_to_use(apps, schema_editor):
logger.info('Initiated migration from Org admin to use role')
roles_added = 0
Organization = apps.get_model('main', 'Organization')
for org in Organization.objects.prefetch_related('admin_role__members').iterator(chunk_size=1000):
igs = list(org.instance_groups.all())
if not igs:
Expand Down

0 comments on commit 3495c42

Please sign in to comment.