From 1cbd4dee49add0c675e15ba717f81d902ae8e648 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Mon, 22 May 2023 23:27:04 +0700 Subject: [PATCH] Fix bug --- judge/comments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/comments.py b/judge/comments.py index 5a38380..88f65e6 100644 --- a/judge/comments.py +++ b/judge/comments.py @@ -217,7 +217,7 @@ class CommentedDetailView(TemplateResponseMixin, SingleObjectMixin, View): if self.request.user.is_authenticated: context["is_new_user"] = ( not self.request.user.is_staff - and not profile.submission_set.filter( + and not self.request.profile.submission_set.filter( points=F("problem__points") ).exists() )