Fix #1376 (Webserver has 500 error for stanza)

This commit is contained in:
Kovid Goyal 2008-12-09 18:40:24 -08:00
parent ec1b12b494
commit 9858e4569c

View File

@ -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']]