From 1136683a1439436cc45a7766d869f64c8574ecfc Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 4 Jul 2022 05:41:44 +0200 Subject: [PATCH] actually fix the followers pages --- files/routes/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/users.py b/files/routes/users.py index b0c5ebfbe..c7de44fbb 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -843,7 +843,7 @@ def redditor_moment_redirect(username, v): @auth_required def followers(username, v): u = get_user(username, v=v) - users = g.db.query(User).join(User.following) \ + users = g.db.query(User).join(Follow, Follow.target_id == u.id) \ .filter(Follow.user_id == User.id) \ .order_by(Follow.created_utc).all() return render_template("followers.html", v=v, u=u, users=users) @@ -852,7 +852,7 @@ def followers(username, v): @auth_required def following(username, v): u = get_user(username, v=v) - users = g.db.query(User).join(User.followers) \ + users = g.db.query(User).join(Follow, Follow.user_id == u.id) \ .filter(Follow.target_id == User.id) \ .order_by(Follow.created_utc).all() return render_template("following.html", v=v, u=u, users=users)