mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-28 08:02:11 +00:00
commit
df873278ab
@ -70,7 +70,7 @@ class SubmissionAPI(APIView):
|
|||||||
except Problem.DoesNotExist:
|
except Problem.DoesNotExist:
|
||||||
return self.error("Problem not exist")
|
return self.error("Problem not exist")
|
||||||
if data["language"] not in problem.languages:
|
if data["language"] not in problem.languages:
|
||||||
return self.error(f"{data['language']} is now allowed in the problem")
|
return self.error(f"{data['language']} is not allowed in the problem")
|
||||||
submission = Submission.objects.create(user_id=request.user.id,
|
submission = Submission.objects.create(user_id=request.user.id,
|
||||||
username=request.user.username,
|
username=request.user.username,
|
||||||
language=data["language"],
|
language=data["language"],
|
||||||
|
Loading…
Reference in New Issue
Block a user