From 770c748bd994a9ff475cecd0067a600e8be2c3f6 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 29 Jan 2023 21:18:13 +0100 Subject: [PATCH] couleurs finalist pour le pot vieux --- apps/activity/tables.py | 2 +- apps/activity/views.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/activity/tables.py b/apps/activity/tables.py index 3320707f..2a454652 100644 --- a/apps/activity/tables.py +++ b/apps/activity/tables.py @@ -78,7 +78,7 @@ def get_row_class(record): elif record.note.balance < 0: c += " table-danger" #MODE VIEUXCON=ON - if (datetime.datetime.utcnow().timestamp() - record.note.create_at.timestamp()) > 3600*24*365*3: + if (datetime.datetime.utcnow().timestamp() - record.note.created_at.timestamp()) > 3600*24*365*3: c += " font-weight-bold" return c diff --git a/apps/activity/views.py b/apps/activity/views.py index f677a759..bfd344ef 100644 --- a/apps/activity/views.py +++ b/apps/activity/views.py @@ -223,13 +223,13 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView): # Keep only users that have a note note_qs = note_qs.filter(note__noteuser__isnull=False) - if activity.activity_type.name != "Pot Vieux": - # 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(), - ) +# if activity.activity_type.name != "Pot Vieux": +# # 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(), +# ) # Filter with permission backend note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request, Alias, "view"))