From eb073c8ac94b898f3d5f333e9fc3ac99dc8a287b Mon Sep 17 00:00:00 2001 From: esp Date: Mon, 24 Aug 2015 12:31:20 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=90=8E=E7=AB=AF]=E6=B7=BB=E5=8A=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=AF=94=E8=B5=9B=E9=A2=98=E7=9B=AE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9=E9=A2=98=E7=9B=AE=E5=88=86=E6=95=B0=E7=9A=84=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contest/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contest/views.py b/contest/views.py index df8acb0..402b7a7 100644 --- a/contest/views.py +++ b/contest/views.py @@ -171,7 +171,8 @@ class ContestProblemAdminAPIView(APIView): created_by=request.user, hint=data["hint"], contest=contest, - sort_index=data["sort_index"]) + sort_index=data["sort_index"], + score=data["score"]) return success_response(ContestProblemSerializer(contest_problem).data) else: return serializer_invalid_response(serializer) @@ -201,6 +202,7 @@ class ContestProblemAdminAPIView(APIView): contest_problem.hint = data["hint"] contest_problem.visible = data["visible"] contest_problem.sort_index = data["sort_index"] + contest_problem.score = data["score"] contest_problem.save() return success_response(ContestProblemSerializer(contest_problem).data) else: