Bug #1914207: Average rating tooltip shows on hierarchical search Edit

This commit is contained in:
Charles Haley 2021-02-02 10:55:01 +00:00
parent d4638fc663
commit 7eb7cc4971

View File

@ -216,7 +216,7 @@ class TagTreeItem(object): # {{{
ar = self.average_rating
if ar:
tt.append(_('Average rating for books in this category: %.1f') % ar)
elif self.type == self.TAG and ar is not None:
elif self.type == self.TAG and ar is not None and self.tag.category != 'search':
tt.append(_('Books in this category are unrated'))
if self.type == self.TAG and self.tag.category == 'search':
tt.append(_('Search expression:') + ' ' + self.tag.search_expression)