aboutsummaryrefslogtreecommitdiff
path: root/app/models.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-05-27 17:27:41 +0100
committerrubenwardy <rw@rubenwardy.com>2020-05-27 17:47:31 +0100
commitfc5cca9def131ca8c9c844f0d9cc87837909427c (patch)
tree4c38cecd655914befe160a25c705a19ee4a41e5c /app/models.py
parentdc455bcd876478db6338f99d1845f9c1f34e870d (diff)
downloadcheatdb-fc5cca9def131ca8c9c844f0d9cc87837909427c.tar.xz
Fix display_name rather than username being used in API
Diffstat (limited to 'app/models.py')
-rw-r--r--app/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models.py b/app/models.py
index 61b6e56..8f00c95 100644
--- a/app/models.py
+++ b/app/models.py
@@ -537,7 +537,7 @@ class Package(db.Model):
return {
"name": self.name,
"title": self.title,
- "author": self.author.display_name,
+ "author": self.author.username,
"short_description": self.short_desc,
"type": self.type.toName(),
"release": release and release.id,
@@ -548,7 +548,7 @@ class Package(db.Model):
tnurl = self.getThumbnailURL(1)
release = self.getDownloadRelease(version=version, protonum=protonum)
return {
- "author": self.author.display_name,
+ "author": self.author.username,
"name": self.name,
"title": self.title,
"short_description": self.short_desc,