From 6cb0cbd4f762e6aca8eb347894946d1165843070 Mon Sep 17 00:00:00 2001 From: adamscmRH Date: Mon, 31 Jul 2017 13:23:43 -0400 Subject: [PATCH] Inventory update endpoint now returns empty list --- awx/api/views.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/awx/api/views.py b/awx/api/views.py index be4d0db14c..4fee59a14b 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -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