Fix content server error if return to top level after using virt libs

Fix content server giving an error if you return to the top level page
after using the virtual libraries. Fixes #1216838 [500 Internal Server Error  The server encountered an unexpected condition which prevented it from fulfilling the request.](https://bugs.launchpad.net/calibre/+bug/1216838)
This commit is contained in:
Kovid Goyal 2013-08-26 15:37:52 +05:30
parent aad985ad06
commit e469703793

View File

@ -358,7 +358,10 @@ class BrowseServer(object):
cats.append((_('Virtual Libs.'), 'virt_libs', 'lt.png'))
def getter(x):
return category_meta[x]['name'].lower()
try:
return category_meta[x]['name'].lower()
except KeyError:
return x
displayed_custom_fields = custom_fields_to_display(self.db)
uc_displayed = set()