Remove distinct

This commit is contained in:
cuom1999 2022-11-02 17:36:40 -05:00
parent 796f135530
commit c0ffbb3ada

View file

@ -327,7 +327,7 @@ class ProblemAdmin(CompareVersionAdmin):
access |= Q(authors__id=request.profile.id) | Q( access |= Q(authors__id=request.profile.id) | Q(
curators__id=request.profile.id curators__id=request.profile.id
) )
return queryset.filter(access).distinct() if access else queryset.none() return queryset.filter(access) if access else queryset.none()
def has_change_permission(self, request, obj=None): def has_change_permission(self, request, obj=None):
if request.user.has_perm("judge.edit_all_problem") or obj is None: if request.user.has_perm("judge.edit_all_problem") or obj is None: