mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
修复比赛题目公开后没有修改公开状态的 bug
This commit is contained in:
parent
9e4342f649
commit
6776b88cb4
@ -278,6 +278,8 @@ class MakeContestProblemPublicAPIView(APIView):
|
||||
problem_id = request.data.get("problem_id", -1)
|
||||
try:
|
||||
problem = ContestProblem.objects.get(id=problem_id)
|
||||
problem.is_public = True
|
||||
problem.save()
|
||||
except ContestProblem.DoesNotExist:
|
||||
return error_response(u"比赛不存在")
|
||||
Problem.objects.create(title=problem.title, description=problem.description,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user