mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Merge pull request #121 from rooftopcellist/smart_inventory_revert
Inventory update endpoint now returns empty list
This commit is contained in:
commit
ff01ab063c
@ -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…
Reference in New Issue
Block a user