From 9ec3fb3b51cbdfa26744d949aac6e22ea9b387a0 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Tue, 11 Oct 2022 06:37:40 -0700 Subject: [PATCH] use proper get function --- files/routes/users.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/files/routes/users.py b/files/routes/users.py index 978122ac1b..635c0016b7 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -77,8 +77,13 @@ def upvoting_downvoting(v, username, uid, cls, vote_cls, vote_dir, template, sta listing = [p.id for p in listing] next_exists = len(listing) > 25 listing = listing[:25] - - listing = get_posts(listing, v=v) + + if cls == Submission: + listing = get_posts(listing, v=v) + elif cls == Comment: + listing = get_comments(listing, v=v) + else: + listing = [] return render_template(template, next_exists=next_exists, listing=listing, page=page, v=v, standalone=standalone)