Content server: Fix option to restrict displayed user field not working in the /opds view

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2019-01-07 06:44:19 +05:30
commit 16218882f6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -491,7 +491,10 @@ def opds(ctx, rd):
except KeyError: except KeyError:
return x return x
fm = rc.db.field_metadata
for category in sorted(categories, key=lambda x: sort_key(getter(x))): for category in sorted(categories, key=lambda x: sort_key(getter(x))):
if fm.is_ignorable_field(category) and not rc.ctx.is_field_displayable(category):
continue
if len(categories[category]) == 0: if len(categories[category]) == 0:
continue continue
if category in ('formats', 'identifiers'): if category in ('formats', 'identifiers'):