Content server: Fix a regression in the previous release that caused the OPDS feeds from the content server to break if there are no custom columns in the library. Fixes #1621642 [OPDS 500 internal server error](https://bugs.launchpad.net/calibre/+bug/1621642)

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2016-09-09 13:24:17 +05:30
commit 063bad47b6

View File

@ -179,8 +179,8 @@ def ACQUISITION_ENTRY(item, version, db, updated, CFM, CKEYS, prefix):
extra.append(_('SERIES: %(series)s [%(sidx)s]<br />')%
dict(series=xml(series),
sidx=fmt_sidx(float(item[FM['series_index']]))))
mi = db.get_metadata(item[CFM['id']['rec_index']], index_is_id=True)
for key in CKEYS:
mi = db.get_metadata(item[CFM['id']['rec_index']], index_is_id=True)
name, val = mi.format_field(key)
if val:
datatype = CFM[key]['datatype']