Skip to content

Commit

Permalink
Use public methods to reference registered models (#15277)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Jun 17, 2024
1 parent 31a086b commit f6c0eff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion awx/main/migrations/_dab_rbac.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def setup_managed_role_definitions(apps, schema_editor):
managed_role_definitions = []

org_perms = set()
for cls in permission_registry._registry:
for cls in permission_registry.all_registered_models:
ct = ContentType.objects.get_for_model(cls)
object_perms = set(Permission.objects.filter(content_type=ct))
# Special case for InstanceGroup which has an organiation field, but is not an organization child object
Expand Down

0 comments on commit f6c0eff

Please sign in to comment.