Skip to content

Commit

Permalink
UserList: do not duplicate user names
Browse files Browse the repository at this point in the history
  • Loading branch information
octomike committed Oct 6, 2018
1 parent d4b1011 commit 4f55d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def get_queryset(self):
self.departmentfilter = self.kwargs.get("department", "all")

if self.departmentfilter != "all" and self.departmentfilter != "my":
users = users.filter(departments__id=self.departmentfilter)
users = users.filter(departments__id=self.departmentfilter).distinct()
elif self.departmentfilter == "my":
users = users.filter(departments__in=self.request.user.departments.all())
users = users.filter(departments__in=self.request.user.departments.all()).distinct()

# filter by given filter string
if self.filterstring != "":
Expand Down

0 comments on commit 4f55d1b

Please sign in to comment.