be tolerant of missing models when updating field cache

This commit is contained in:
Damien Elmes 2012-11-10 12:55:11 +09:00
parent 884ade00c2
commit 8aa23c7156

View file

@ -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))