mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Restore original behavior of group children unattach.
This commit is contained in:
parent
fd7c2550ee
commit
2c4a16369d
@ -1868,6 +1868,14 @@ class GroupChildrenList(EnforceParentRelationshipMixin, SubListCreateAttachDetac
|
||||
relationship = 'children'
|
||||
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):
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user