This commit is contained in:
Daniel 2025-03-20 20:40:43 +08:00
parent 9945ad7a7a
commit b883f07cb4
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017
2 changed files with 2 additions and 3 deletions

View File

@ -936,8 +936,7 @@ func (tx *Transaction) doAddFlashcards(operation *Operation) (ret *TxErr) {
continue
}
cardID := ast.NewNodeID()
deck.AddCard(cardID, blockID)
deck.AddCard(ast.NewNodeID(), blockID)
}
if err := deck.Save(); err != nil {

View File

@ -352,7 +352,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
bIDs := deckToImport.GetBlockIDs()
cards := deckToImport.GetCardsByBlockIDs(bIDs)
for _, card := range cards {
deck.AddCard(card.ID(), blockIDs[card.BlockID()])
deck.AddCard(ast.NewNodeID(), blockIDs[card.BlockID()])
}
if 0 < len(cards) {