diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-01-19 19:09:04 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-01-19 19:09:04 +0000 |
commit | 0bda16de6dae7a684acf4332312765fe2d78741c (patch) | |
tree | 86d19c95f391af2b2897ca3d4a307878b09fc065 /app/models.py | |
parent | fd6ba459f928d110d796cd464b16f47f97dc0f53 (diff) | |
download | cheatdb-0bda16de6dae7a684acf4332312765fe2d78741c.tar.xz |
Add API tests
Diffstat (limited to 'app/models.py')
-rw-r--r-- | app/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models.py b/app/models.py index 61e9222..1ff2904 100644 --- a/app/models.py +++ b/app/models.py @@ -472,8 +472,7 @@ class Package(db.Model): "short_description": self.short_desc, "type": self.type.toName(), "release": release and release.id, - "thumbnail": (base_url + tnurl) if tnurl is not None else None, - "score": round(self.score * 10) / 10 + "thumbnail": (base_url + tnurl) if tnurl is not None else None } def getAsDictionary(self, base_url, version=None, protonum=None): @@ -708,8 +707,9 @@ class MinetestRelease(db.Model): name = db.Column(db.String(100), unique=True, nullable=False) protocol = db.Column(db.Integer, nullable=False, default=0) - def __init__(self, name=None): + def __init__(self, name=None, protocol=0): self.name = name + self.protocol = protocol def getActual(self): return None if self.name == "None" else self |