From fc5cca9def131ca8c9c844f0d9cc87837909427c Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 27 May 2020 17:27:41 +0100 Subject: [PATCH] Fix display_name rather than username being used in API --- app/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models.py b/app/models.py index 61b6e567..8f00c958 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,