From: Radek Czajka Date: Mon, 19 Mar 2012 09:31:32 +0000 (+0100) Subject: handle no epub in opds X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/1beaf3b696a5de934f5df02081b95fce8c933e5b handle no epub in opds --- diff --git a/apps/opds/views.py b/apps/opds/views.py index 4f1bec09e..09aaa5477 100644 --- a/apps/opds/views.py +++ b/apps/opds/views.py @@ -185,10 +185,10 @@ class AcquisitionFeed(Feed): return u'' def item_enclosure_url(self, book): - return full_url(book.epub_file.url) + return full_url(book.epub_file.url) if book.epub_file else None def item_enclosure_length(self, book): - return book.epub_file.size + return book.epub_file.size if book.epub_file else None @piwik_track class RootFeed(Feed):