Merge pull request #1663 from anoek/distinct-removal

.distinct() removal from global filter_queryset method
This commit is contained in:
Akita Noek 2016-04-25 08:46:01 -04:00
commit e697a5441c
2 changed files with 2 additions and 2 deletions

View File

@ -220,7 +220,7 @@ class FieldLookupBackend(BaseFilterBackend):
q = Q(**{k:v})
queryset = queryset.filter(q)
queryset = queryset.filter(*args)
return queryset.distinct()
return queryset
except (FieldError, FieldDoesNotExist, ValueError), e:
raise ParseError(e.args[0])
except ValidationError, e:

View File

@ -3573,7 +3573,7 @@ class RoleChildrenList(SubListAPIView):
# XXX: This should be the intersection between the roles of the user
# and the roles that the requesting user has access to see
role = Role.objects.get(pk=self.kwargs['pk'])
return role.children
return role.children.all()