From ae76df8da2c4a5fcd9a148bf3fb1bf96b3a17df8 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 8 Nov 2024 21:33:09 +0200 Subject: [PATCH] revert last commit --- files/routes/groups.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/groups.py b/files/routes/groups.py index 11850e193..784ef5fa9 100644 --- a/files/routes/groups.py +++ b/files/routes/groups.py @@ -171,7 +171,7 @@ def memberships(v, group_name): group = g.db.get(Group, group_name) if not group: stop(404) - members = g.db.query(GroupMembership).join(GroupMembership.user).filter( + members = g.db.query(GroupMembership).filter( GroupMembership.group_name == group_name, GroupMembership.approved_utc != None, GroupMembership.user_id != group.owner_id, @@ -180,7 +180,7 @@ def memberships(v, group_name): members = members.order_by(GroupMembership.is_mod.desc(), GroupMembership.approved_utc).offset(500 * (page - 1)).limit(500).all() if page == 1: - owner = [g.db.query(GroupMembership).join(GroupMembership.user).filter( + owner = [g.db.query(GroupMembership).filter( GroupMembership.group_name == group_name, GroupMembership.approved_utc != None, GroupMembership.user_id == group.owner_id,