diff --git a/rslib/src/collection/transact.rs b/rslib/src/collection/transact.rs index 2d98b6679..8f998594a 100644 --- a/rslib/src/collection/transact.rs +++ b/rslib/src/collection/transact.rs @@ -44,7 +44,10 @@ impl Collection { }) // roll back on error .or_else(|err| { - self.discard_undo_and_study_queues(); + // not necesarry to discard queues for all errors + if !matches!(err, AnkiError::FilteredDeckError { .. }) { + self.discard_undo_and_study_queues(); + } if autocommit { self.storage.rollback_trx()?; } else {