mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Print out details of all of the crosslinked roles
This commit is contained in:
parent
b17f0a188b
commit
de25408a23
@ -3,4 +3,9 @@ from collections import Counter
|
||||
from awx.main.models.rbac import Role
|
||||
|
||||
|
||||
print(Counter(r.id == getattr(getattr(r.content_object, r.role_field, None), 'id', None) for r in Role.objects.all() if r.content_type))
|
||||
for r in Role.objects.all():
|
||||
if not r.content_type:
|
||||
continue
|
||||
if r.id != getattr(getattr(r.content_object, r.role_field, None), 'id', None):
|
||||
rev = getattr(r.content_object, r.role_field, None)
|
||||
print(f"role.id={r.id} '{r.content_type}' id={r.object_id} field={r.role_field} | obj.roleid={getattr(rev, 'id', None)} {getattr(rev, 'content_type', None)} {getattr(rev, 'object_id', None)} {getattr(rev, 'role_field', None)}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user