From e4697037936dd87fd2663317f758ee8c98069d71 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 26 Aug 2013 15:37:52 +0530 Subject: [PATCH] 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) --- src/calibre/library/server/browse.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/server/browse.py b/src/calibre/library/server/browse.py index 5c2ffe7865..a770f19856 100644 --- a/src/calibre/library/server/browse.py +++ b/src/calibre/library/server/browse.py @@ -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()