mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:53:06 +02:00
Bug 1904305: annotation_count() displaying value for deleted annotations
This commit is contained in:
parent
77259de1b0
commit
86bd4623d4
1 changed files with 4 additions and 1 deletions
|
|
@ -1949,7 +1949,10 @@ def dirty_books_with_dirtied_annotations(self):
|
|||
return changed
|
||||
|
||||
def annotation_count_for_book(self, book_id):
|
||||
for (count,) in self.execute('SELECT count(id) FROM annotations WHERE book=?', (book_id,)):
|
||||
for (count,) in self.execute('''
|
||||
SELECT count(id) FROM annotations
|
||||
WHERE book=? AND json_extract(annot_data, "$.removed") IS NULL
|
||||
''', (book_id,)):
|
||||
return count
|
||||
return 0
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue