From c06626cbc1c73987a74d6bbc848626eb5ec6afa0 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Mon, 24 Aug 2015 03:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=A2=98=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E5=A2=9E=E5=8A=A0=E5=AF=B9=E6=AF=94=E8=B5=9B?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- submission/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/submission/views.py b/submission/views.py index 6399e22..daac6f6 100644 --- a/submission/views.py +++ b/submission/views.py @@ -173,6 +173,8 @@ class ContestSubmissionAPIView(APIView): contest = Contest.objects.get(id=data["contest_id"]) except Contest.DoesNotExist: return error_response(u"比赛不存在") + if contest.status != 0: + return error_response(u"比赛已经结束或者还没有开始") try: problem = ContestProblem.objects.get(contest=contest, id=data["problem_id"]) # 更新题目提交计数器