This commit is contained in:
Kovid Goyal 2015-11-23 15:33:03 +05:30
parent 4f51fc439e
commit 502193eb24

View File

@ -113,7 +113,10 @@ class TagTreeItem(object): # {{{
if self.tag.avg_rating:
total += 1
num += self.tag.avg_rating
try:
return num/float(total)
except ZeroDivisionError:
return 0
def data(self, role):
if role == Qt.UserRole: