Skip to content
Snippets Groups Projects
Commit 7ff1ecab authored by Andrei Cioromila's avatar Andrei Cioromila
Browse files

fix(manuscript-manager): await for manuscript status update to guarantee data integrity

parent 50206cb5
No related branches found
No related tags found
3 merge requests!162Sprint 23 Features,!161Deploy S23 features and fixes,!159Hin 1153 status after review
......@@ -92,18 +92,16 @@ class Collection {
async updateStatusOnRecommendation({ isEditorInChief, recommendation }) {
if (isEditorInChief) {
if (recommendation === 'return-to-handling-editor') {
this.updateStatus({ newStatus: 'reviewCompleted' })
} else {
this.updateFinalStatusByRecommendation({
recommendation,
})
return this.updateStatus({ newStatus: 'reviewCompleted' })
}
} else {
this.updateStatusByRecommendation({
return this.updateFinalStatusByRecommendation({
recommendation,
isHandlingEditor: true,
})
}
return this.updateStatusByRecommendation({
recommendation,
isHandlingEditor: true,
})
}
getHELastName() {
......
......@@ -127,7 +127,7 @@ module.exports = models => async (req, res) => {
newRecommendation.comments = comments || undefined
if (recommendationType === 'editorRecommendation') {
collectionHelper.updateStatusOnRecommendation({
await collectionHelper.updateStatusOnRecommendation({
isEditorInChief,
recommendation,
})
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment