From e03a7792ca9800b01bbf67a61241441ec28b4dae Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 20 May 2014 14:04:46 -0400 Subject: [PATCH] Missing call to all when querying the relation manager --- awx/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/views.py b/awx/api/views.py index a5eece819f..a6cc911ab6 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -797,7 +797,7 @@ class GroupChildrenRemove(DestroyAPIView): def destroy(self, request, *args, **kwargs): parent_group = self.get_object() group = Group.objects.get(id=kwargs['subgroup_pk']) - if group not in parent_group.children: + if group not in parent_group.children.all(): return Response(status=status.HTTP_404_NOT_FOUND) group.mark_inactive_recursive(parent_group) return Response()