reformat code.
This commit is contained in:
1 parent
ee49d0a815
commit
8b85f86124
6 files changed
+11
-17
No files matched your search
@@ -4,7 +4,7 @@ from utils.api import JSONResponse
|
||||
|
||||
from .models import ProblemPermission
|
||||
|
||||
from contest.models import Contest, ContestType, ContestStatus
|
||||
from contest.models import Contest, ContestType
|
||||
|
||||
|
||||
class BasePermissionDecorator(object):
|
||||
@@ -67,10 +67,10 @@ def check_contest_permission(func):
|
||||
self = args[0]
|
||||
request = args[1]
|
||||
user = request.user
|
||||
if kwargs.get('contest_id'):
|
||||
contest_id = kwargs.pop('contest_id')
|
||||
if kwargs.get("contest_id"):
|
||||
contest_id = kwargs.pop("contest_id")
|
||||
else:
|
||||
contest_id = request.GET.get('contest_id')
|
||||
contest_id = request.GET.get("contest_id")
|
||||
if not contest_id:
|
||||
return self.error("Parameter contest_id not exist.")
|
||||
|
||||
|
||||
Reference in new issue
Block a user