We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ba646d commit db96c83Copy full SHA for db96c83
src/judge0/api.py
@@ -75,7 +75,15 @@ def wait(
75
}
76
77
while len(submissions_to_check) > 0 and not retry_mechanism.is_done():
78
- client.get_submissions(submissions_to_check.values())
+ # We differentiate between getting a single submission and multiple
79
+ # submissions to be consistent with the API, even though the API
80
+ # allows to get single submission with the same endpoint as for getting
81
+ # the multiple submissions.
82
+ if len(submissions_to_check) == 1:
83
+ client.get_submission(*submissions_to_check.values())
84
+ else:
85
+ client.get_submissions(submissions_to_check.values())
86
+
87
for token in list(submissions_to_check):
88
submission = submissions_to_check[token]
89
if submission.is_done():
0 commit comments