Missing call to all when querying the relation manager

This commit is contained in:
Matthew Jones
2014-05-20 14:04:46 -04:00
parent e57d8718ff
commit e03a7792ca

View File

@@ -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()