mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 07:47:44 -02:30
Inventory Update All no longer includes manual sources
This commit is contained in:
@@ -2482,6 +2482,9 @@ class InventoryInventorySourcesUpdate(RetrieveAPIView):
|
|||||||
inventory = self.get_object()
|
inventory = self.get_object()
|
||||||
update_data = []
|
update_data = []
|
||||||
for inventory_source in inventory.inventory_sources.all():
|
for inventory_source in inventory.inventory_sources.all():
|
||||||
|
if inventory_source.source == '':
|
||||||
|
continue
|
||||||
|
else:
|
||||||
details = {'inventory_source': inventory_source.pk,
|
details = {'inventory_source': inventory_source.pk,
|
||||||
'can_update': inventory_source.can_update}
|
'can_update': inventory_source.can_update}
|
||||||
update_data.append(details)
|
update_data.append(details)
|
||||||
@@ -2503,7 +2506,8 @@ class InventoryInventorySourcesUpdate(RetrieveAPIView):
|
|||||||
can_update = False
|
can_update = False
|
||||||
else:
|
else:
|
||||||
project_update = True
|
project_update = True
|
||||||
|
if inventory_source.source == '':
|
||||||
|
continue
|
||||||
if can_update:
|
if can_update:
|
||||||
if project_update:
|
if project_update:
|
||||||
details['project_update'] = inventory_source.source_project.update().id
|
details['project_update'] = inventory_source.source_project.update().id
|
||||||
|
|||||||
Reference in New Issue
Block a user