mirror of
https://github.com/ankitects/anki.git
synced 2025-12-21 19:02:57 -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,
|
||||
did
|
||||
FROM cards
|
||||
WHERE ord = 0
|
||||
AND nid IN (
|
||||
WHERE nid IN (
|
||||
SELECT nid
|
||||
FROM search_nids
|
||||
)
|
||||
)
|
||||
GROUP BY nid
|
||||
HAVING ord = MIN(ord)
|
||||
|
|
@ -131,7 +131,7 @@ impl SqliteStorage {
|
|||
.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>> {
|
||||
self.db
|
||||
.prepare_cached(include_str!("all_decks_of_search_notes.sql"))?
|
||||
|
|
|
|||
Loading…
Reference in a new issue