Fix a bug
This commit is contained in:
parent
b45de198ba
commit
3b98f975a0
1 changed files with 2 additions and 2 deletions
|
@ -751,7 +751,7 @@ class ContestParticipationList(LoginRequiredMixin, ContestRankingBase):
|
|||
class ContestParticipationDisqualify(ContestMixin, SingleObjectMixin, View):
|
||||
def get_object(self, queryset=None):
|
||||
contest = super().get_object(queryset)
|
||||
if not self.can_edit:
|
||||
if not contest.is_editable_by(self.request.user):
|
||||
raise Http404()
|
||||
return contest
|
||||
|
||||
|
@ -772,7 +772,7 @@ class ContestMossMixin(ContestMixin, PermissionRequiredMixin):
|
|||
|
||||
def get_object(self, queryset=None):
|
||||
contest = super().get_object(queryset)
|
||||
if settings.MOSS_API_KEY is None or not self.can_edit:
|
||||
if settings.MOSS_API_KEY is None or not contest.is_editable_by(self.request.user):
|
||||
raise Http404()
|
||||
if not contest.is_editable_by(self.request.user):
|
||||
raise Http404()
|
||||
|
|
Loading…
Reference in a new issue