don't panic when invalid note id provided to change notetype
https://forums.ankiweb.net/t/fatal-error-while-updating-deck/12743/2
This commit is contained in:
parent
a4ff1152d3
commit
9a27e44ff8
@ -254,7 +254,7 @@ impl Collection {
|
||||
let ctx = CardGenContext::new(¬etype, last_deck, usn);
|
||||
|
||||
for nid in note_ids {
|
||||
let mut note = self.storage.get_note(*nid)?.unwrap();
|
||||
let mut note = self.storage.get_note(*nid)?.ok_or(AnkiError::NotFound)?;
|
||||
let original = note.clone();
|
||||
remap_fields(note.fields_mut(), new_fields);
|
||||
note.notetype_id = new_notetype_id;
|
||||
|
Loading…
Reference in New Issue
Block a user