From 7494b137040be3d5c8ef287e75b8c4bc7b621e7b Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Fri, 4 Mar 2016 11:41:08 -0500 Subject: [PATCH] find correct fact to update * The fact cache receiver needs to look for an exact match, rather than * a relative, most recent fact. --- awx/main/management/commands/run_fact_cache_receiver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/management/commands/run_fact_cache_receiver.py b/awx/main/management/commands/run_fact_cache_receiver.py index 42fc25a561..062cd39693 100644 --- a/awx/main/management/commands/run_fact_cache_receiver.py +++ b/awx/main/management/commands/run_fact_cache_receiver.py @@ -67,7 +67,7 @@ class FactCacheReceiver(object): self.timestamp = datetime.fromtimestamp(date_key, None) # Update existing Fact entry - fact_obj = Fact.get_host_fact(host_obj.id, module_name, self.timestamp) + fact_obj = Fact.objects.filter(host__id=host_obj.id, module=module_name, timestamp=self.timestamp) if fact_obj: fact_obj.facts = facts fact_obj.save()