This commit is contained in:
Liang Ding 2022-12-22 19:58:59 +08:00
parent 591ca63466
commit 02d3a3a12b
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D

View File

@ -88,8 +88,8 @@ func GetDueFlashcards(deckID string) (ret []*Flashcard, err error) {
cards := deck.Dues()
for _, card := range cards {
blockID := card.BlockID()
_, getErr := GetBlock(blockID)
if nil != getErr {
if nil == treenode.GetBlockTree(blockID) {
continue
}
ret = append(ret, &Flashcard{
@ -109,8 +109,7 @@ func getAllDueFlashcards() (ret []*Flashcard, err error) {
cards := deck.Dues()
for _, card := range cards {
blockID := card.BlockID()
_, getErr := GetBlock(blockID)
if nil != getErr {
if nil == treenode.GetBlockTree(blockID) {
continue
}