From 6eb304c3be2a0b298a42c804eee5a26add6b71fe Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 23 Nov 2015 21:22:54 +0530 Subject: [PATCH] Fix a bug in the counting of ratings from legacy databases --- src/calibre/db/categories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/db/categories.py b/src/calibre/db/categories.py index 37138895f0..f209138f54 100644 --- a/src/calibre/db/categories.py +++ b/src/calibre/db/categories.py @@ -161,7 +161,7 @@ def get_categories(dbcache, sort='name', book_ids=None, first_letter_sort=False) for x in tuple(categories['rating']): if r.name == x.name and r.id != x.id: r.id_set |= x.id_set - r.count = r.count + x.count + r.count = len(r.id_set) categories['rating'].remove(x) break