Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b33d20

Browse files
authored
Fix LRT database check for cards with no usable reviews (#4284)
Fixes https://forums.ankiweb.net/t/anki-25-08-beta-3/64738/62
1 parent 542c557 commit 3b33d20

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rslib/src/storage/card/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,9 @@ impl super::SqliteStorage {
403403
let last_revlog_info = get_last_revlog_info(&revlog);
404404
for (card_id, last_revlog_info) in last_revlog_info {
405405
let card = self.get_card(card_id)?;
406-
if let Some(mut card) = card {
406+
if last_revlog_info.last_reviewed_at.is_none() {
407+
continue;
408+
} else if let Some(mut card) = card {
407409
if card.ctype != CardType::New && card.last_review_time.is_none() {
408410
card.last_review_time = last_revlog_info.last_reviewed_at;
409411
self.update_card(&card)?;

0 commit comments

Comments
 (0)