Fix note id mix-up when resolving notetype conflicts (#2940)

Closes #2939.
This commit is contained in:
RumovZ 2024-01-11 04:50:03 +01:00 committed by GitHub
parent cf5f716037
commit 1613eae261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -544,7 +544,7 @@ fn combine_template_ords_maps(old_map: &mut HashMap<u16, u16>, 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<String, NoteMeta>,
@ -556,7 +556,7 @@ fn notetype_conflicts(
conflicts
.entry((meta.notetype_id, note.notetype_id))
.or_default()
.push(note.id);
.push(meta.id);
}
};
}