This repository was archived by the owner on Apr 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -664,7 +664,7 @@ export const Annotation = types
664664 onSnapshot ( self . areas , self . autosave ) ;
665665 } ) ,
666666
667- saveDraft ( ) {
667+ saveDraft ( params ) {
668668 // if this is now a history item or prediction don't save it
669669 if ( ! self . editable ) return ;
670670
@@ -677,7 +677,7 @@ export const Annotation = types
677677 self . versions . draft = result ;
678678 self . setDraftSaving ( true ) ;
679679
680- self . store . submitDraft ( self ) . then ( self . onDraftSaved ) ;
680+ return self . store . submitDraft ( self , params ) . then ( self . onDraftSaved ) ;
681681 } ,
682682
683683 saveDraftImmediately ( ) {
Original file line number Diff line number Diff line change @@ -726,12 +726,9 @@ export default types
726726 async function postponeTask ( ) {
727727 const annotation = self . annotationStore . selected ;
728728
729- if ( ! annotation . versions . draft ) {
730- // annotation created from prediction, so no draft was created
731- annotation . versions . draft = annotation . versions . result ;
732- }
733-
734- await self . submitDraft ( annotation , { was_postponed : true } ) ;
729+ // save draft before postponing; this can be new draft with FF_DEV_4174 off
730+ // or annotation created from prediction
731+ await annotation . saveDraft ( { was_postponed : true } ) ;
735732 await getEnv ( self ) . events . invoke ( 'nextTask' ) ;
736733 }
737734
You can’t perform that action at this time.
0 commit comments