From 51c73cb357090fd5af92c19541898678067719dc Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Fri, 17 Nov 2017 10:16:49 -0500 Subject: [PATCH] update original when updating computed fields --- awx/main/models/inventory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 3ab007d325..4bb3c8838f 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -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: