File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
app/preprints/-components/submit/preprint-state-machine Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -213,22 +213,21 @@ export default class PreprintStateMachine extends Component<StateMachineArgs>{
213213 @waitFor
214214 public async onSubmit ( ) : Promise < void > {
215215 this . args . resetPageDirty ( ) ;
216- if ( ! this . isEditFlow ) {
217- if ( this . provider . reviewsWorkflow ) {
218- const reviewAction = this . store . createRecord ( 'review-action' , {
219- actionTrigger : 'submit' ,
220- target : this . preprint ,
221- } ) ;
222- await reviewAction . save ( ) ;
223- } else {
224- this . preprint . isPublished = true ;
225- await this . preprint . save ( ) ;
226- }
227216
217+ if ( this . preprint . reviewsState === ReviewsState . ACCEPTED ) {
218+ await this . preprint . save ( ) ;
219+ } else if ( this . provider . reviewsWorkflow ) {
220+ const reviewAction = this . store . createRecord ( 'review-action' , {
221+ actionTrigger : 'submit' ,
222+ target : this . preprint ,
223+ } ) ;
224+ await reviewAction . save ( ) ;
225+ } else {
226+ this . preprint . isPublished = true ;
227+ await this . preprint . save ( ) ;
228228 }
229229
230230 await this . preprint . reload ( ) ;
231-
232231 await this . router . transitionTo ( 'preprints.detail' , this . provider . id , this . preprint . id ) ;
233232 }
234233
You can’t perform that action at this time.
0 commit comments