Skip to content

Commit

Permalink
Fix pending feedbacks not being shown
Browse files Browse the repository at this point in the history
`not_answered` should be a queryset of Users, not attendees
  • Loading branch information
henrikhorluck committed Feb 12, 2024
1 parent 7c5840e commit 27e305b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/feedback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
2 changes: 1 addition & 1 deletion onlineweb4/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 27e305b

Please sign in to comment.