remove contest type
This commit is contained in:
@@ -3,7 +3,7 @@ import hashlib
|
||||
import inspect
|
||||
import time
|
||||
|
||||
from contest.models import Contest, ContestRuleType, ContestStatus, ContestType
|
||||
from contest.models import Contest, ContestStatus, ContestType
|
||||
from problem.models import Problem
|
||||
from utils.api import APIError, JSONResponse
|
||||
from utils.constants import CONTEST_PASSWORD_SESSION_KEY
|
||||
@@ -139,11 +139,6 @@ def check_contest_permission(check_type="details"):
|
||||
if self.contest.status == ContestStatus.CONTEST_NOT_START and check_type != "details":
|
||||
return self.error("Contest has not started yet.")
|
||||
|
||||
# check does user have permission to get ranks, submissions in OI Contest
|
||||
if self.contest.status == ContestStatus.CONTEST_UNDERWAY and self.contest.rule_type == ContestRuleType.OI:
|
||||
if not self.contest.real_time_rank and (check_type == "ranks" or check_type == "submissions"):
|
||||
return self.error(f"No permission to get {check_type}")
|
||||
|
||||
return func(*args, **kwargs)
|
||||
return _check_permission
|
||||
return decorator
|
||||
|
||||
Reference in New Issue
Block a user