mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
be tolerant of missing models when updating field cache
This commit is contained in:
parent
884ade00c2
commit
8aa23c7156
1 changed files with 3 additions and 0 deletions
|
@ -445,6 +445,9 @@ where c.nid = n.id and c.id in %s group by nid""" % ids2str(cids)):
|
|||
for (nid, mid, flds) in self._fieldData(snids):
|
||||
fields = splitFields(flds)
|
||||
model = self.models.get(mid)
|
||||
if not model:
|
||||
# note points to invalid model
|
||||
continue
|
||||
r.append((stripHTML(fields[self.models.sortIdx(model)]),
|
||||
fieldChecksum(fields[0]),
|
||||
nid))
|
||||
|
|
Loading…
Reference in a new issue