mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 17:14:06 +02:00
Fix #1873045 [Calibre - 'NoneType' object is not iterable](https://bugs.launchpad.net/calibre/+bug/1873045)
This commit is contained in:
parent
175282da52
commit
65d9d72588
1 changed files with 3 additions and 4 deletions
|
|
@ -928,10 +928,6 @@ def data(self, index, role):
|
|||
id_ = self.id(index)
|
||||
self.column_color.mi = None
|
||||
|
||||
if self.color_row_fmt_cache is None:
|
||||
self.color_row_fmt_cache = tuple(fmt for key, fmt in
|
||||
self.db.prefs['column_color_rules'] if key == color_row_key)
|
||||
|
||||
for k, fmt in self.db.prefs['column_color_rules']:
|
||||
if k == key:
|
||||
ccol = self.column_color(id_, key, fmt, self.db,
|
||||
|
|
@ -954,6 +950,9 @@ def data(self, index, role):
|
|||
except:
|
||||
pass
|
||||
|
||||
if self.color_row_fmt_cache is None:
|
||||
self.color_row_fmt_cache = tuple(fmt for key, fmt in
|
||||
self.db.prefs['column_color_rules'] if key == color_row_key)
|
||||
for fmt in self.color_row_fmt_cache:
|
||||
ccol = self.column_color(id_, color_row_key, fmt, self.db,
|
||||
self.color_cache, self.color_template_cache)
|
||||
|
|
|
|||
Loading…
Reference in a new issue