Просмотр исходного кода

:art: Support resetting the learning progress of flashcards https://github.com/siyuan-note/siyuan/issues/9564

Daniel 1 год назад
Родитель
Сommit
97c33f14d9
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      kernel/model/flashcard.go

+ 4 - 0
kernel/model/flashcard.go

@@ -43,6 +43,10 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) {
 	// Support resetting the learning progress of flashcards https://github.com/siyuan-note/siyuan/issues/9564
 
 	if 0 < len(blockIDs) {
+		if "" == deckID {
+			deckID = builtinDeckID
+		}
+
 		resetFlashcards(deckID, blockIDs)
 		return
 	}