File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,11 @@ downloadSubmission.schema = joi.object({
222
222
* @return {Promise<Object> } Data fetched from ES
223
223
*/
224
224
async function listSubmissions ( authUser , query ) {
225
+ let loadLegacy = false
226
+ if ( query . loadLegacy ) {
227
+ loadLegacy = true
228
+ delete query . loadLegacy
229
+ }
225
230
if ( query . challengeId ) {
226
231
// Submission api now only works with v5 challenge id
227
232
// If it is a legacy challenge id, get the associated v5 challenge id
@@ -266,7 +271,7 @@ async function listSubmissions (authUser, query) {
266
271
// services. We can't do that here because it would introduce a circular dependency because the
267
272
// review service calls back to the submission service (this file)
268
273
// The check for submission.legacyId is for Phoenix submissions - we won't necessarily have the ID for those.
269
- if ( ! hasReviewInES && submission . id && submission . legacySubmissionId && query . loadLegacy ) {
274
+ if ( ! hasReviewInES && submission . id && submission . legacySubmissionId && loadLegacy ) {
270
275
await informixHelper . loadOnlineReviewDetails ( authUser , submission )
271
276
}
272
277
You can’t perform that action at this time.
0 commit comments