From e2ef2bdb213d684e076b28d0ac7cc831af10644b Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 3 Nov 2022 01:47:20 -0500 Subject: [PATCH] Fix bug: --- judge/admin/problem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/admin/problem.py b/judge/admin/problem.py index 45f402c..4f70ed4 100644 --- a/judge/admin/problem.py +++ b/judge/admin/problem.py @@ -327,7 +327,7 @@ class ProblemAdmin(CompareVersionAdmin): access |= Q(authors__id=request.profile.id) | Q( curators__id=request.profile.id ) - return queryset.filter(access) if access else queryset.none() + return queryset.filter(access).distinct() if access else queryset.none() def has_change_permission(self, request, obj=None): if request.user.has_perm("judge.edit_all_problem") or obj is None: