Fix review rating

This commit is contained in:
rubenwardy 2023-04-15 03:20:01 +01:00
parent b1bd39c0fc
commit 1b1955f052

@ -213,7 +213,7 @@ class PackageReview(db.Model):
return ret return ret
def asWeight(self): def asWeight(self):
return 2.0 * self.rating / 5.0 - 1 return 2.0 * (self.rating - 1) / 4.0 - 1
def getEditURL(self): def getEditURL(self):
return self.package.getURL("packages.review") return self.package.getURL("packages.review")