mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 19:57:29 +01:00
Simplify review rating
This commit is contained in:
parent
1b1955f052
commit
c9e8df7f5b
@ -213,7 +213,10 @@ class PackageReview(db.Model):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def asWeight(self):
|
def asWeight(self):
|
||||||
return 2.0 * (self.rating - 1) / 4.0 - 1
|
"""
|
||||||
|
From (1, 5) to (-1 to 1)
|
||||||
|
"""
|
||||||
|
return (self.rating - 3.0) / 2.0
|
||||||
|
|
||||||
def getEditURL(self):
|
def getEditURL(self):
|
||||||
return self.package.getURL("packages.review")
|
return self.package.getURL("packages.review")
|
||||||
|
Loading…
Reference in New Issue
Block a user