mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Fix small plurality issue when recalculating host fields
This commit is contained in:
@@ -200,7 +200,7 @@ class Inventory(CommonModel):
|
|||||||
# Find all hosts that need the has_inventory_sources flag cleared.
|
# Find all hosts that need the has_inventory_sources flag cleared.
|
||||||
hosts_to_clear = hosts_qs.filter(has_inventory_sources=True).exclude(pk__in=hosts_with_cloud_inventory)
|
hosts_to_clear = hosts_qs.filter(has_inventory_sources=True).exclude(pk__in=hosts_with_cloud_inventory)
|
||||||
for host_pk in hosts_to_clear.values_list('pk', flat=True):
|
for host_pk in hosts_to_clear.values_list('pk', flat=True):
|
||||||
host_updates = hosts_to_updates.setdefault(host_pk, {})
|
host_updates = hosts_to_update.setdefault(host_pk, {})
|
||||||
host_updates['has_inventory_sources'] = False
|
host_updates['has_inventory_sources'] = False
|
||||||
# Now apply updates to hosts where needed (in batches).
|
# Now apply updates to hosts where needed (in batches).
|
||||||
all_update_pks = hosts_to_update.keys()
|
all_update_pks = hosts_to_update.keys()
|
||||||
|
|||||||
Reference in New Issue
Block a user