Fix LRT database check for cards with no usable reviews (#4284)

Fixes https://forums.ankiweb.net/t/anki-25-08-beta-3/64738/62
This commit is contained in:
user1823 2025-09-01 09:49:36 +05:30 committed by GitHub
parent 542c557404
commit 3b33d20849
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -403,7 +403,9 @@ impl super::SqliteStorage {
let last_revlog_info = get_last_revlog_info(&revlog); let last_revlog_info = get_last_revlog_info(&revlog);
for (card_id, last_revlog_info) in last_revlog_info { for (card_id, last_revlog_info) in last_revlog_info {
let card = self.get_card(card_id)?; let card = self.get_card(card_id)?;
if let Some(mut card) = card { if last_revlog_info.last_reviewed_at.is_none() {
continue;
} else if let Some(mut card) = card {
if card.ctype != CardType::New && card.last_review_time.is_none() { if card.ctype != CardType::New && card.last_review_time.is_none() {
card.last_review_time = last_revlog_info.last_reviewed_at; card.last_review_time = last_revlog_info.last_reviewed_at;
self.update_card(&card)?; self.update_card(&card)?;