mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a bug in the counting of ratings from legacy databases
This commit is contained in:
parent
4c425353bf
commit
6eb304c3be
@ -161,7 +161,7 @@ def get_categories(dbcache, sort='name', book_ids=None, first_letter_sort=False)
|
|||||||
for x in tuple(categories['rating']):
|
for x in tuple(categories['rating']):
|
||||||
if r.name == x.name and r.id != x.id:
|
if r.name == x.name and r.id != x.id:
|
||||||
r.id_set |= x.id_set
|
r.id_set |= x.id_set
|
||||||
r.count = r.count + x.count
|
r.count = len(r.id_set)
|
||||||
categories['rating'].remove(x)
|
categories['rating'].remove(x)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user