From 9858e4569c26298e698480d5e05802ed62787285 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 9 Dec 2008 18:40:24 -0800 Subject: [PATCH] Fix #1376 (Webserver has 500 error for stanza) --- src/calibre/library/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/server.py b/src/calibre/library/server.py index fad5fd4aaf..1fcd824a5f 100644 --- a/src/calibre/library/server.py +++ b/src/calibre/library/server.py @@ -256,7 +256,9 @@ class LibraryServer(object): ' Feeds to read calibre books on a ipod with stanza.' books = [] for record in iter(self.db): - if 'EPUB' in record[FIELD_MAP['formats']].upper(): + r = record[FIELD_MAP['formats']] + r = r.upper() if r else '' + if 'EPUB' in r: authors = ' & '.join([i.replace('|', ',') for i in record[FIELD_MAP['authors']].split(',')]) extra = [] rating = record[FIELD_MAP['rating']]