Ignore invalid I/O notetypes when deciding whether to add
https://forums.ankiweb.net/t/can-t-add-new-cards/37155
This commit is contained in:
parent
07909a54e2
commit
469052700f
@ -46,7 +46,9 @@ impl Collection {
|
||||
pub(crate) fn get_first_io_notetype(&mut self) -> Result<Option<Arc<Notetype>>> {
|
||||
for nt in self.get_all_notetypes()? {
|
||||
if nt.config.original_stock_kind() == OriginalStockKind::ImageOcclusion {
|
||||
return Some(io_notetype_if_valid(nt)).transpose();
|
||||
if let Ok(nt) = io_notetype_if_valid(nt) {
|
||||
return Ok(Some(nt));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user