From 0184fbb68c8bf1d8d1a123929dfab0497d5236af Mon Sep 17 00:00:00 2001 From: Fulgen301 Date: Sun, 26 Aug 2018 20:24:53 +0200 Subject: uploads: Fix wrong attribute name --- routes/uploads.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/uploads.py b/routes/uploads.py index 391827d..5c7d7fc 100644 --- a/routes/uploads.py +++ b/routes/uploads.py @@ -26,7 +26,7 @@ def _add_upload(entry : Upload, session : DBSession): "title" : entry.title, "author" : { "id" : entry.author.id if entry.author is not None else "0" * 24, - "username" : entry.author.username if entry.author is not None else "N/A" + "username" : entry.author.name if entry.author is not None else "N/A" }, "tags" : entry.tags, "files" : [{ @@ -64,7 +64,7 @@ def _add_upload(entry : Upload, session : DBSession): "body" : comment.body, "author" : { "id" : comment.author.id, - "username" : comment.author.username + "username" : comment.author.name }, "upload" : comment.upload.id, "createdAt" : comment.created_at.isoformat(), -- cgit v1.2.3-54-g00ecf