From 3b8aa1f6c3b748e3840f96bbbf048aa3acdeced2 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Mon, 1 Jul 2024 10:11:14 -0400 Subject: [PATCH] fix: allow proxy submission to submit without manuscript --- app/controllers/submissions/new.js | 3 ++- app/routes/submissions/new.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/submissions/new.js b/app/controllers/submissions/new.js index 7647000d..25be962c 100644 --- a/app/controllers/submissions/new.js +++ b/app/controllers/submissions/new.js @@ -86,7 +86,8 @@ export default class SubmissionsNew extends Controller { manuscriptFiles = _.uniqBy(manuscriptFiles, 'id'); - if (manuscriptFiles.length == 0 && this.userIsSubmitter) { + const submitter = await this.userIsSubmitter(); + if (manuscriptFiles.length == 0 && submitter) { swal('Manuscript Is Missing', 'At least one manuscript file is required. Please go back and add one', 'warning'); } else if (manuscriptFiles.length > 1) { swal( diff --git a/app/routes/submissions/new.js b/app/routes/submissions/new.js index 5b6c48df..fe80b3b6 100644 --- a/app/routes/submissions/new.js +++ b/app/routes/submissions/new.js @@ -55,7 +55,9 @@ export default class NewRoute extends CheckSessionRoute { if (params.submission) { // Operating on existing submission - newSubmission = await this.store.findRecord('submission', params.submission, { include: 'publication.journal' }); + newSubmission = await this.store.findRecord('submission', params.submission, { + include: 'publication.journal,submitter', + }); publication = await newSubmission.get('publication'); journal = publication.get('journal');