Skip to content

Commit

Permalink
fix: allow proxy submission to submit without manuscript
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredgalanis committed Jul 1, 2024
1 parent 5219b46 commit 3b8aa1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/controllers/submissions/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion app/routes/submissions/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 3b8aa1f

Please sign in to comment.