Fixed addon_bayesian_rating (bug 793985)
This commit is contained in:
Родитель
3d6077534c
Коммит
2d201630e8
|
@ -71,6 +71,10 @@ def addon_bayesian_rating(*addons, **kw):
|
|||
return
|
||||
mc = avg['reviews'] * avg['rating']
|
||||
for addon in Addon.uncached.filter(id__in=addons):
|
||||
if addon.average_rating is None:
|
||||
# ignoring addons with no average rating
|
||||
continue
|
||||
|
||||
q = Addon.objects.filter(id=addon.id)
|
||||
if addon.total_reviews:
|
||||
num = mc + F('total_reviews') * F('average_rating')
|
||||
|
|
2
vendor
2
vendor
|
@ -1 +1 @@
|
|||
Subproject commit 000388a211189ccb9515f483cf397b4b4bb5d3f8
|
||||
Subproject commit 07cdc17417eb35425854369a4b7a87dc19c98610
|
Загрузка…
Ссылка в новой задаче