Skip to content

Commit b9f467a

Browse files
committed
Add flag to load legacy data, with the default being not to
1 parent 68062fe commit b9f467a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/SubmissionService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ async function listSubmissions (authUser, query) {
266266
// services. We can't do that here because it would introduce a circular dependency because the
267267
// review service calls back to the submission service (this file)
268268
// 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) {
269+
if (!hasReviewInES && submission.id && submission.legacySubmissionId && query.loadLegacy) {
270270
await informixHelper.loadOnlineReviewDetails(authUser, submission)
271271
}
272272

@@ -298,6 +298,7 @@ const listSubmissionsQuerySchema = {
298298
challengeId: joi.alternatives().try(joi.id(), joi.string().uuid()),
299299
legacySubmissionId: joi.alternatives().try(joi.id(), joi.string().uuid()),
300300
legacyUploadId: joi.alternatives().try(joi.id(), joi.string().uuid()),
301+
loadLegacy: joi.boolean(),
301302
submissionPhaseId: joi.id(),
302303
page: joi.id(),
303304
perPage: joi.pageSize(),

0 commit comments

Comments
 (0)