Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
show every project only once!
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzylogic2000 committed May 20, 2019
1 parent 6403ba7 commit 92ca3c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions liqd_product/apps/projects/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def filter_viewable(queryset, user):
elif user.is_authenticated:
return queryset.filter(
Q(is_public=True) |
Q(participants__pk=user.pk) |
Q(organisation__initiators__pk=user.pk) |
Q(moderators__pk=user.pk)
)
Q(participants__in=[user.pk]) |
Q(organisation__initiators__id__in=[user.pk]) |
Q(moderators__in=[user.pk])
).distinct()
else:
return queryset.filter(
is_public=True
Expand Down

0 comments on commit 92ca3c7

Please sign in to comment.