From ea8ed285de1d472c2d2b383dd1bf3167dfcca699 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 6 Jan 2022 21:09:37 +0200 Subject: [PATCH] fds --- files/classes/comment.py | 3 ++- files/classes/submission.py | 2 +- files/templates/sidebar_Drama.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index aad16a107..df020a22d 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -10,6 +10,7 @@ from files.classes.votes import CommentVote from files.helpers.const import AUTOPOLLER_ID, AUTOBETTER_ID, censor_slurs from files.helpers.lazy import lazy from .flags import CommentFlag +from .award import AwardRelationship from random import randint site = environ.get("DOMAIN").strip() @@ -52,7 +53,7 @@ class Comment(Base): senttouser = relationship("User", primaryjoin="User.id==Comment.sentto", viewonly=True) parent_comment = relationship("Comment", remote_side=[id], viewonly=True) child_comments = relationship("Comment", remote_side=[parent_comment_id], viewonly=True) - awards = relationship("AwardRelationship", viewonly=True) + awards = relationship("AwardRelationship", viewonly=True, order_by=AwardRelationship.id) reports = relationship("CommentFlag", viewonly=True) def __init__(self, *args, **kwargs): diff --git a/files/classes/submission.py b/files/classes/submission.py index 287fd90bf..dd718539f 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -57,7 +57,7 @@ class Submission(Base): author = relationship("User", primaryjoin="Submission.author_id==User.id") oauth_app = relationship("OauthApp", viewonly=True) approved_by = relationship("User", uselist=False, primaryjoin="Submission.is_approved==User.id", viewonly=True) - awards = relationship("AwardRelationship", viewonly=True, order_by=AwardRelationship.id.desc()) + awards = relationship("AwardRelationship", viewonly=True, order_by=AwardRelationship.id) reports = relationship("Flag", viewonly=True) def __init__(self, *args, **kwargs): diff --git a/files/templates/sidebar_Drama.html b/files/templates/sidebar_Drama.html index 181e71e5c..b814d2d91 100644 --- a/files/templates/sidebar_Drama.html +++ b/files/templates/sidebar_Drama.html @@ -1,5 +1,5 @@