mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-03-02 07:55:04 +01:00
Cover grid: Fix text showing 'None' for rating fields for books with no rating
This commit is contained in:
parent
805dd105a5
commit
c6dadb7100
1 changed files with 2 additions and 2 deletions
|
|
@ -379,8 +379,8 @@ def render_field(self, db, book_id):
|
|||
mi = db.get_proxy_metadata(book_id)
|
||||
display_name, ans, val, fm = mi.format_field_extended(field)
|
||||
if fm and fm['datatype'] == 'rating':
|
||||
ans = u'\u2605' * int(val/2.0)
|
||||
return unicode(ans)
|
||||
ans = u'\u2605' * int(val/2.0) if val is not None else ''
|
||||
return '' if ans is None else unicode(ans)
|
||||
except Exception:
|
||||
if DEBUG:
|
||||
import traceback
|
||||
|
|
|
|||
Loading…
Reference in a new issue