Compare commits

..

1 Commits

Author SHA1 Message Date
aeltheos 22aa91593c Merge branch 'nix-shell' into 'main'
Nix shell

See merge request bde/nk20!201
2024-09-06 01:03:59 +02:00
1 changed files with 3 additions and 2 deletions

View File

@ -265,11 +265,12 @@ class ActivityEntryView(LoginRequiredMixin, SingleTableMixin, TemplateView):
# Keep only users that have a note
note_qs = note_qs.filter(note__noteuser__isnull=False)
# Keep only valid members
# Keep only members
note_qs = note_qs.filter(
note__noteuser__user__memberships__club=activity.attendees_club,
note__noteuser__user__memberships__date_start__lte=timezone.now(),
note__noteuser__user__memberships__date_end__gte=timezone.now()).exclude(note__inactivity_reason='forced')
note__noteuser__user__memberships__date_end__gte=timezone.now(),
)
# Filter with permission backend
note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request, Alias, "view"))