mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix crash when books in GST don't have ratings
This commit is contained in:
parent
6eb304c3be
commit
6c2f86b7b7
@ -213,7 +213,7 @@ def get_categories(dbcache, sort='name', book_ids=None, first_letter_sort=False)
|
||||
total_rating = 0
|
||||
count = 0
|
||||
for id_ in t.id_set:
|
||||
rating = book_rating_map[id_]
|
||||
rating = book_rating_map.get(id_, 0)
|
||||
if rating:
|
||||
total_rating += rating/2
|
||||
count += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user