Commit 574bd37c80b6dc304b4b1e2a79e190f00926059a
1 parent
40e71f67
Exists in
master
and in
3 other branches
fixing search results
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
subjects/views.py
... | ... | @@ -603,7 +603,7 @@ class SubjectSearchView(LoginRequiredMixin, LogMixin, ListView): |
603 | 603 | for tag in tags: |
604 | 604 | q = q | Q(tags__name__unaccent__icontains=tag ) |
605 | 605 | |
606 | - subjects = Subject.objects.filter(q) | |
606 | + subjects = Subject.objects.filter(q).distinct() | |
607 | 607 | #pk = self.request.user.pk |
608 | 608 | #my_subjects = Subject.objects.filter(Q(students__pk=pk) | Q(professor__pk=pk) | Q(category__coordinators__pk=pk) & Q(tags__name__in=tags) ).distinct() |
609 | 609 | ... | ... |