Commit 2ca02fb9 authored by Mirko Vucicevich's avatar Mirko Vucicevich
Browse files

Added distinct to project filter

parent 84d809b6
......@@ -25,7 +25,7 @@ def make_api_key():
class ProjectManagerQS(models.QuerySet):
def by_user(self, user):
return self.filter(models.Q(author=user) | models.Q(groups__users=user) | models.Q(fallback__user=user))
return self.filter(models.Q(author=user) | models.Q(groups__users=user) | models.Q(fallback__user=user)).distinct()
class Project(models.Model):
objects = models.Manager.from_queryset(ProjectManagerQS)()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment