add new version api

This commit is contained in:
zema1
2018-01-04 19:43:18 +08:00
committed by virusdefender
parent 8454b36792
commit 914c4727fc
5 changed files with 54 additions and 3 deletions
+1 -1
View File
@@ -423,7 +423,7 @@ class MakeContestProblemPublicAPIView(APIView):
return self.error("Problem does not exist")
if not problem.contest or problem.is_public:
return self.error("Alreay be a public problem")
return self.error("Already be a public problem")
problem.is_public = True
problem.save()
# https://docs.djangoproject.com/en/1.11/topics/db/queries/#copying-model-instances