mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
mprove error message when changing an inventory from regular -> smart
see: https://github.com/ansible/awx/issues/5744 Co-Authored-By: kldavis52 <kyle.linnard.davis@gmail.com>
This commit is contained in:
parent
5248ac4498
commit
64da67fa2e
@ -134,7 +134,8 @@ class InventoryDetail(RelatedJobsPreventDeleteMixin, ControlledByScmMixin, Retri
|
||||
|
||||
# Do not allow changes to an Inventory kind.
|
||||
if kind is not None and obj.kind != kind:
|
||||
return self.http_method_not_allowed(request, *args, **kwargs)
|
||||
return Response(dict(error=_('You cannot turn a regular inventory into a "smart" inventory.')),
|
||||
status=status.HTTP_405_METHOD_NOT_ALLOWED)
|
||||
return super(InventoryDetail, self).update(request, *args, **kwargs)
|
||||
|
||||
def destroy(self, request, *args, **kwargs):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user