mirror of
https://github.com/ansible/awx.git
synced 2026-01-23 07:28:02 -03:30
Inventory update endpoint now returns empty list
This commit is contained in:
parent
9d1853f6df
commit
6cb0cbd4f7
@ -2496,8 +2496,6 @@ class InventoryInventorySourcesUpdate(RetrieveAPIView):
|
||||
|
||||
def retrieve(self, request, *args, **kwargs):
|
||||
inventory = self.get_object()
|
||||
if inventory.kind =='smart':
|
||||
return Response(dict(error=_("Smart Inventories cannot host dynamic inventory sources.")), status=status.HTTP_400_BAD_REQUEST)
|
||||
update_data = []
|
||||
for inventory_source in inventory.inventory_sources.exclude(source=''):
|
||||
details = {'inventory_source': inventory_source.pk,
|
||||
@ -2510,8 +2508,6 @@ class InventoryInventorySourcesUpdate(RetrieveAPIView):
|
||||
update_data = []
|
||||
successes = 0
|
||||
failures = 0
|
||||
if inventory.kind =='smart':
|
||||
return Response(dict(error=_("Inventory update cannot be completed with Smart Inventory.")), status=status.HTTP_400_BAD_REQUEST)
|
||||
for inventory_source in inventory.inventory_sources.exclude(source=''):
|
||||
details = {'inventory_source': inventory_source.pk, 'status': None}
|
||||
can_update = inventory_source.can_update
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user