mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Fix change notetype affecting cards outside selection
Accidentally introduced by the search refactoring in #1600, this lead to a query that matched items outside of the selected notes, eg (n.id in (1506029488152) and c.ord = 43 or c.ord = 4) Closes #1727
This commit is contained in:
parent
d100f7a2c8
commit
e2eff7deae
1 changed files with 2 additions and 2 deletions
|
@ -314,13 +314,13 @@ impl Collection {
|
||||||
usn: Usn,
|
usn: Usn,
|
||||||
) -> Result<(), AnkiError> {
|
) -> Result<(), AnkiError> {
|
||||||
if !map.remapped.is_empty() {
|
if !map.remapped.is_empty() {
|
||||||
let mut ords = SearchBuilder::any(
|
let ords = SearchBuilder::any(
|
||||||
map.remapped
|
map.remapped
|
||||||
.keys()
|
.keys()
|
||||||
.map(|o| TemplateKind::Ordinal(*o as u16)),
|
.map(|o| TemplateKind::Ordinal(*o as u16)),
|
||||||
);
|
);
|
||||||
self.search_cards_into_table(
|
self.search_cards_into_table(
|
||||||
SearchBuilder::from(nids).and_join(&mut ords),
|
SearchBuilder::from(nids).and_join(&mut ords.group()),
|
||||||
SortMode::NoOrder,
|
SortMode::NoOrder,
|
||||||
)?;
|
)?;
|
||||||
for mut card in self.storage.all_searched_cards()? {
|
for mut card in self.storage.all_searched_cards()? {
|
||||||
|
|
Loading…
Reference in a new issue