mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Integrate a new overall disassociate to /groups/n/children
This commit is contained in:
parent
e2fb427789
commit
8cbf60e3b7
@ -762,6 +762,14 @@ class GroupChildrenList(SubListCreateAPIView):
|
||||
parent_model = Group
|
||||
relationship = 'children'
|
||||
|
||||
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.mark_inactive()
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
def _unattach(self, request, *args, **kwargs): # FIXME: Disabled for now for UI support.
|
||||
'''
|
||||
Special case for disassociating a child group from the parent. If the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user