mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Restore original behavior of group children unattach.
This commit is contained in:
@@ -1868,6 +1868,14 @@ class GroupChildrenList(EnforceParentRelationshipMixin, SubListCreateAttachDetac
|
|||||||
relationship = 'children'
|
relationship = 'children'
|
||||||
enforce_parent_relationship = 'inventory'
|
enforce_parent_relationship = 'inventory'
|
||||||
|
|
||||||
|
def unattach(self, request, *args, **kwargs):
|
||||||
|
sub_id = request.data.get('id', None)
|
||||||
|
if sub_id is not None:
|
||||||
|
return super(GroupChildrenList, self).unattach(request, *args, **kwargs)
|
||||||
|
parent = self.get_parent_object()
|
||||||
|
parent.delete()
|
||||||
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
||||||
|
|
||||||
class GroupPotentialChildrenList(SubListAPIView):
|
class GroupPotentialChildrenList(SubListAPIView):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user