mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02:30
Merge pull request #1117 from chrismeyersfsu/fix-fact_cache_receiver
find correct fact to update
This commit is contained in:
@@ -67,7 +67,7 @@ class FactCacheReceiver(object):
|
|||||||
self.timestamp = datetime.fromtimestamp(date_key, None)
|
self.timestamp = datetime.fromtimestamp(date_key, None)
|
||||||
|
|
||||||
# Update existing Fact entry
|
# 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:
|
if fact_obj:
|
||||||
fact_obj.facts = facts
|
fact_obj.facts = facts
|
||||||
fact_obj.save()
|
fact_obj.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user