mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Simplify review rating
This commit is contained in:
parent
1b1955f052
commit
c9e8df7f5b
@ -213,7 +213,10 @@ class PackageReview(db.Model):
|
||||
return ret
|
||||
|
||||
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):
|
||||
return self.package.getURL("packages.review")
|
||||
|
Loading…
Reference in New Issue
Block a user