mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Guard against the role field not being populated
when doing the final reset of Role.implicit_parents.
This commit is contained in:
parent
2c3a7fafc5
commit
345c1c11e9
@ -180,6 +180,7 @@ print(" role_fields = [f for f in cls._meta.fields if isinstance(f, ImplicitR
|
||||
print(" obj = cls.objects.get(id=obj_id)")
|
||||
print(" for f in role_fields:")
|
||||
print(" r = getattr(obj, f.name, None)")
|
||||
print(" r.implicit_parents = '[]'")
|
||||
print(" r.save()")
|
||||
print(" if r is not None:")
|
||||
print(" r.implicit_parents = '[]'")
|
||||
print(" r.save()")
|
||||
print(" obj.save()")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user