Blob Blame History Raw
From b782f5d025820b773048679d5edea7563633fd94 Mon Sep 17 00:00:00 2001
From: Kovid Goyal <kovid@kovidgoyal.net>
Date: Wed, 7 Aug 2019 19:27:42 +0530
Subject: [PATCH 38/71] py3 compat

---
 src/calibre/srv/opds.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/calibre/srv/opds.py b/src/calibre/srv/opds.py
index a5caf6ffea..b9de203d25 100644
--- a/src/calibre/srv/opds.py
+++ b/src/calibre/srv/opds.py
@@ -182,7 +182,7 @@ def ACQUISITION_ENTRY(book_id, updated, request_context):
     field_metadata = request_context.db.field_metadata
     mi = request_context.db.get_metadata(book_id)
     extra = []
-    if mi.rating > 0:
+    if (mi.rating or 0) > 0:
         rating = rating_to_stars(mi.rating)
         extra.append(_('RATING: %s<br />')%rating)
     if mi.tags: