mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Fix/Reschedule doesn't work on cards in filtered deck (#3441)
* Fix/Reschedule doesn't work on cards in filtered deck * Update docstring (dae)
This commit is contained in:
parent
d6aa95950d
commit
159681d9f2
2 changed files with 9 additions and 3 deletions
|
@ -61,10 +61,11 @@ pub enum SearchNode {
|
|||
EditedInDays(u32),
|
||||
CardTemplate(TemplateKind),
|
||||
Deck(String),
|
||||
/// Matches cards in a list of decks (original_deck_id is not checked).
|
||||
/// Matches cards in a list of deck ids. Cards are matched even if they are
|
||||
/// in a filtered deck.
|
||||
DeckIdsWithoutChildren(String),
|
||||
/// Matches cards in a deck or its children (original_deck_id is not
|
||||
/// checked).
|
||||
/// checked, so filtered cards are not matched).
|
||||
DeckIdWithChildren(DeckId),
|
||||
IntroducedInDays(u32),
|
||||
NotetypeId(NotetypeId),
|
||||
|
|
|
@ -161,7 +161,12 @@ impl SqlWriter<'_> {
|
|||
write!(self.sql, "n.mid = {}", ntid).unwrap();
|
||||
}
|
||||
SearchNode::DeckIdsWithoutChildren(dids) => {
|
||||
write!(self.sql, "c.did in ({})", dids).unwrap();
|
||||
write!(
|
||||
self.sql,
|
||||
"c.did in ({}) or (c.odid != 0 and c.odid in ({}))",
|
||||
dids, dids
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
SearchNode::DeckIdWithChildren(did) => self.write_deck_id_with_children(*did)?,
|
||||
SearchNode::Notetype(notetype) => self.write_notetype(&norm(notetype)),
|
||||
|
|
Loading…
Reference in a new issue