mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 13:27:40 -02:30
convert py2 -> py3
This commit is contained in:
@@ -1397,6 +1397,8 @@ class JobTemplateAccess(BaseAccess):
|
||||
]
|
||||
|
||||
for k, v in data.items():
|
||||
if k not in [x.name for x in obj._meta.concrete_fields]:
|
||||
continue
|
||||
if hasattr(obj, k) and getattr(obj, k) != v:
|
||||
if k not in field_whitelist and v != getattr(obj, '%s_id' % k, None) \
|
||||
and not (hasattr(obj, '%s_id' % k) and getattr(obj, '%s_id' % k) is None and v == ''): # Equate '' to None in the case of foreign keys
|
||||
|
||||
Reference in New Issue
Block a user