mirror of https://gitlab.crans.org/bde/nk20
Compare commits
3 Commits
22aa91593c
...
164725a6b8
Author | SHA1 | Date |
---|---|---|
aeltheos | 164725a6b8 | |
quark | 9162319734 | |
quark | 5d2a8e9b79 |
|
@ -265,12 +265,11 @@ class ActivityEntryView(LoginRequiredMixin, SingleTableMixin, TemplateView):
|
||||||
# Keep only users that have a note
|
# Keep only users that have a note
|
||||||
note_qs = note_qs.filter(note__noteuser__isnull=False)
|
note_qs = note_qs.filter(note__noteuser__isnull=False)
|
||||||
|
|
||||||
# Keep only members
|
# Keep only valid members
|
||||||
note_qs = note_qs.filter(
|
note_qs = note_qs.filter(
|
||||||
note__noteuser__user__memberships__club=activity.attendees_club,
|
note__noteuser__user__memberships__club=activity.attendees_club,
|
||||||
note__noteuser__user__memberships__date_start__lte=timezone.now(),
|
note__noteuser__user__memberships__date_start__lte=timezone.now(),
|
||||||
note__noteuser__user__memberships__date_end__gte=timezone.now(),
|
note__noteuser__user__memberships__date_end__gte=timezone.now()).exclude(note__inactivity_reason='forced')
|
||||||
)
|
|
||||||
|
|
||||||
# Filter with permission backend
|
# Filter with permission backend
|
||||||
note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request, Alias, "view"))
|
note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request, Alias, "view"))
|
||||||
|
|
Loading…
Reference in New Issue