This commit is contained in:
2026-05-24 20:44:02 -06:00
parent 5371b7daf1
commit 65c48437a9
7 changed files with 11 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ class CommentAPI(APIView):
if problem_id:
try:
# 这里如果题目不可见,也需要显示该题目的评论
problem = Problem.objects.get(_id=problem_id, contest_id__isnull=True)
problem = Problem.objects.get(_id__iexact=problem_id, contest_id__isnull=True)
except Problem.DoesNotExist:
return self.error("Problem doesn't exist")
comments = comments.filter(problem=problem)