1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-08-31 00:51:16 +02:00

Answers to survey

This commit is contained in:
Ehouarn
2025-08-29 17:13:52 +02:00
parent 4da87872bd
commit 55be3c9836
3 changed files with 100 additions and 80 deletions

View File

@@ -214,6 +214,8 @@ class WEIDetailView(ProtectQuerysetMixin, LoginRequiredMixin, MultiTableMixin, D
context["not_first_year"] = WEIMembership.objects.filter(user=self.request.user).exists()
context["registration_validated"] = WEIMembership.objects.filter(registration=my_registration).exists() if my_registration else False
qs = WEIMembership.objects.filter(club=club, registration__first_year=True, bus__isnull=True)
context["can_validate_1a"] = PermissionBackend.check_perm(
self.request, "wei.change_weimembership_bus", qs.first()) if qs.exists() else False