mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Use public methods to reference registered models (#15277)
This commit is contained in:
parent
31a086b11a
commit
f6c0effcb2
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user