Content server: Fix regression that caused various emtadata to be missing in the book details view. Fixes #8929 (Improve Content Server usability)

This commit is contained in:
Kovid Goyal 2011-03-05 14:57:49 -07:00
parent 64fd29fa3e
commit 9eb94d425b

View File

@ -666,15 +666,13 @@ class BrowseServer(object):
if add_category_links: if add_category_links:
added_key = False added_key = False
fm = mi.metadata_for_field(key) fm = mi.metadata_for_field(key)
if val and fm and fm['is_category'] and \ if val and fm and fm['is_category'] and not fm['is_csp'] and\
key != 'formats' and fm['datatype'] not in ['rating']: key != 'formats' and fm['datatype'] not in ['rating']:
categories = mi.get(key) categories = mi.get(key)
if isinstance(categories, basestring): if isinstance(categories, basestring):
categories = [categories] categories = [categories]
dbtags = [] dbtags = []
for category in categories: for category in categories:
if category not in ccache:
continue
dbtag = None dbtag = None
for tag in ccache[key]: for tag in ccache[key]:
if tag.name == category: if tag.name == category: