From 0a1070834dda93f43b65efb26f495daced4f7f66 Mon Sep 17 00:00:00 2001 From: chris meyers Date: Thu, 19 Mar 2020 09:04:47 -0400 Subject: [PATCH] only update the ip address field on the instance * The heartbeat of an instance is determined to be the last modified time of the Instance object. Therefore, we want to be careful to only update very specific fields of the Instance object. --- awx/main/managers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/managers.py b/awx/main/managers.py index ea65b36234..9f1537fd6f 100644 --- a/awx/main/managers.py +++ b/awx/main/managers.py @@ -126,7 +126,7 @@ class InstanceManager(models.Manager): instance = instance.get() if instance.ip_address != ip_address: instance.ip_address = ip_address - instance.save() + instance.save(update_fields=['ip_address']) return (True, instance) else: return (False, instance)