mirror of
https://github.com/ankitects/anki.git
synced 2025-12-22 03:12:58 -05:00
Fix deck export for notes with missing card 1
This commit is contained in:
parent
4d98f0656e
commit
be8442cfbe
2 changed files with 5 additions and 4 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
SELECT nid,
|
SELECT nid,
|
||||||
did
|
did
|
||||||
FROM cards
|
FROM cards
|
||||||
WHERE ord = 0
|
WHERE nid IN (
|
||||||
AND nid IN (
|
|
||||||
SELECT nid
|
SELECT nid
|
||||||
FROM search_nids
|
FROM search_nids
|
||||||
)
|
)
|
||||||
|
GROUP BY nid
|
||||||
|
HAVING ord = MIN(ord)
|
||||||
|
|
@ -131,7 +131,7 @@ impl SqliteStorage {
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the deck id of the first card of every searched note.
|
/// Returns the deck id of the first existing card of every searched note.
|
||||||
pub(crate) fn all_decks_of_search_notes(&self) -> Result<HashMap<NoteId, DeckId>> {
|
pub(crate) fn all_decks_of_search_notes(&self) -> Result<HashMap<NoteId, DeckId>> {
|
||||||
self.db
|
self.db
|
||||||
.prepare_cached(include_str!("all_decks_of_search_notes.sql"))?
|
.prepare_cached(include_str!("all_decks_of_search_notes.sql"))?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue