From 27e305b3095dbfd6f666c11ff66669ad763561db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20H=C3=B8rl=C3=BCck=20Berg?= <36937807+henrikhorluck@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:28:22 +0100 Subject: [PATCH] Fix pending feedbacks not being shown `not_answered` should be a queryset of Users, not attendees --- apps/feedback/models.py | 4 ++-- onlineweb4/context_processors.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/feedback/models.py b/apps/feedback/models.py index d84ab9985..01ff11443 100644 --- a/apps/feedback/models.py +++ b/apps/feedback/models.py @@ -156,9 +156,9 @@ def not_answered(self): ~Q(pk__in=self.answered.all()) ) else: - from apps.events.models import Attendee + from apps.authentication.models import OnlineUser - return Attendee.objects.none() + return OnlineUser.objects.none() def content_email(self): if hasattr(self.content_object, "feedback_mail"): diff --git a/onlineweb4/context_processors.py b/onlineweb4/context_processors.py index dd104b4c1..174b10ec3 100644 --- a/onlineweb4/context_processors.py +++ b/onlineweb4/context_processors.py @@ -44,7 +44,7 @@ def feedback_notifier(request): # This method returns both bools and a list for some reason. Python crashes with the expression: x in bool, # so we do this to fetch once and test twice not_answered = active_feedback.not_answered() - if request.user.pk not in not_answered: + if request.user not in not_answered: continue context_extras["feedback_pending"].append(active_feedback)