mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
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
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue