mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 06:29:31 -02:30
Merge pull request #113 from rooftopcellist/smart_inventory_edit
Changes Smart Inventory Error Message
This commit is contained in:
@@ -20,7 +20,7 @@ inventory sources:
|
|||||||
* `project_update`: ID of the project update job that was started if this inventory source is an SCM source.
|
* `project_update`: ID of the project update job that was started if this inventory source is an SCM source.
|
||||||
(interger, read-only, optional)
|
(interger, read-only, optional)
|
||||||
|
|
||||||
Note: All manual inventory sources (source=' ') will be ignored by the update_inventory_sources endpoint. This endpoint will not update inventory sources for Smart Inventories.
|
Note: All manual inventory sources (source="") will be ignored by the update_inventory_sources endpoint. This endpoint will not update inventory sources for Smart Inventories.
|
||||||
|
|
||||||
|
|
||||||
Response code from this action will be:
|
Response code from this action will be:
|
||||||
|
|||||||
@@ -2511,7 +2511,7 @@ class InventoryInventorySourcesUpdate(RetrieveAPIView):
|
|||||||
successes = 0
|
successes = 0
|
||||||
failures = 0
|
failures = 0
|
||||||
if inventory.kind =='smart':
|
if inventory.kind =='smart':
|
||||||
return Response(dict(error=_("Action cannot be completed with Smart Inventory.")), status=status.HTTP_400_BAD_REQUEST)
|
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=''):
|
for inventory_source in inventory.inventory_sources.exclude(source=''):
|
||||||
details = {'inventory_source': inventory_source.pk, 'status': None}
|
details = {'inventory_source': inventory_source.pk, 'status': None}
|
||||||
can_update = inventory_source.can_update
|
can_update = inventory_source.can_update
|
||||||
|
|||||||
Reference in New Issue
Block a user