浏览代码

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

Daniel 1 年之前
父节点
当前提交
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
 	// Support resetting the learning progress of flashcards https://github.com/siyuan-note/siyuan/issues/9564
 
 
 	if 0 < len(blockIDs) {
 	if 0 < len(blockIDs) {
+		if "" == deckID {
+			deckID = builtinDeckID
+		}
+
 		resetFlashcards(deckID, blockIDs)
 		resetFlashcards(deckID, blockIDs)
 		return
 		return
 	}
 	}