1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

update original when updating computed fields

This commit is contained in:
AlanCoding 2017-11-17 10:16:49 -05:00
parent 8d35b71321
commit 51c73cb357
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -357,6 +357,8 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin):
for field, value in computed_fields.items():
if getattr(iobj, field) != value:
setattr(iobj, field, value)
# update in-memory object
setattr(self, field, value)
else:
computed_fields.pop(field)
if computed_fields: