Browse Source

:art: Flashcards are not allowed to be modified during data sync to avoid data overwriting https://github.com/siyuan-note/siyuan/issues/10167

Daniel 1 year ago
parent
commit
43c6fabcdc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      kernel/model/flashcard.go

+ 2 - 2
kernel/model/flashcard.go

@@ -641,7 +641,7 @@ func (tx *Transaction) doRemoveFlashcards(operation *Operation) (ret *TxErr) {
 	deckLock.Lock()
 	defer deckLock.Unlock()
 
-	if syncingStorages.Load() {
+	if isSyncing.Load() {
 		ret = &TxErr{code: TxErrCodeDataIsSyncing}
 		return
 	}
@@ -753,7 +753,7 @@ func (tx *Transaction) doAddFlashcards(operation *Operation) (ret *TxErr) {
 	deckLock.Lock()
 	defer deckLock.Unlock()
 
-	if syncingStorages.Load() {
+	if isSyncing.Load() {
 		ret = &TxErr{code: TxErrCodeDataIsSyncing}
 		return
 	}