From 1613eae2618803289e380a08b37ad84c84e6ae37 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Thu, 11 Jan 2024 04:50:03 +0100 Subject: [PATCH] Fix note id mix-up when resolving notetype conflicts (#2940) Closes #2939. --- rslib/src/import_export/package/apkg/import/notes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rslib/src/import_export/package/apkg/import/notes.rs b/rslib/src/import_export/package/apkg/import/notes.rs index 942e62547..71d55e163 100644 --- a/rslib/src/import_export/package/apkg/import/notes.rs +++ b/rslib/src/import_export/package/apkg/import/notes.rs @@ -544,7 +544,7 @@ fn combine_template_ords_maps(old_map: &mut HashMap, new: &Notetype) { } /// Target ids of notes with conflicting notetypes, with keys -/// `(target note's notetype, incoming note's notetypes)`. +/// `(target note's notetype, incoming note's notetype)`. fn notetype_conflicts( incoming_notes: &[Note], existing_guids: &HashMap, @@ -556,7 +556,7 @@ fn notetype_conflicts( conflicts .entry((meta.notetype_id, note.notetype_id)) .or_default() - .push(note.id); + .push(meta.id); } }; }