mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Cover grid: Fix text showing 'None' for rating fields for books with no rating
This commit is contained in:
parent
805dd105a5
commit
c6dadb7100
@ -379,8 +379,8 @@ class CoverDelegate(QStyledItemDelegate):
|
||||
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…
x
Reference in New Issue
Block a user