Limit unauth members to show at most 500 in admin guid page

This commit is contained in:
Jeremy Zhang 2018-11-11 04:55:30 +00:00
parent 2df9300aa5
commit 6d296e2295
2 changed files with 2 additions and 2 deletions

View File

@ -170,7 +170,7 @@ def administrate_guild(guild_id):
permissions.append("Manage Embed Settings") permissions.append("Manage Embed Settings")
permissions.append("Ban Members") permissions.append("Ban Members")
permissions.append("Kick Members") permissions.append("Kick Members")
all_members = db.session.query(UnauthenticatedUsers).filter(UnauthenticatedUsers.guild_id == guild_id).order_by(UnauthenticatedUsers.id).all() all_members = db.session.query(UnauthenticatedUsers).filter(UnauthenticatedUsers.guild_id == guild_id).order_by(UnauthenticatedUsers.id).limit(500).all()
all_bans = db.session.query(UnauthenticatedBans).filter(UnauthenticatedBans.guild_id == guild_id).all() all_bans = db.session.query(UnauthenticatedBans).filter(UnauthenticatedBans.guild_id == guild_id).all()
users = prepare_guild_members_list(all_members, all_bans) users = prepare_guild_members_list(all_members, all_bans)
dbguild_dict = { dbguild_dict = {

View File

@ -207,7 +207,7 @@ def administrate_guild(guild_id):
if check_user_permission(guild_id, 1): if check_user_permission(guild_id, 1):
permissions.append("Kick Members") permissions.append("Kick Members")
cosmetics = db.session.query(Cosmetics).filter(Cosmetics.user_id == session['user_id']).first() cosmetics = db.session.query(Cosmetics).filter(Cosmetics.user_id == session['user_id']).first()
all_members = db.session.query(UnauthenticatedUsers).filter(UnauthenticatedUsers.guild_id == guild_id).order_by(UnauthenticatedUsers.id).all() all_members = db.session.query(UnauthenticatedUsers).filter(UnauthenticatedUsers.guild_id == guild_id).order_by(UnauthenticatedUsers.id).limit(500).all()
all_bans = db.session.query(UnauthenticatedBans).filter(UnauthenticatedBans.guild_id == guild_id).all() all_bans = db.session.query(UnauthenticatedBans).filter(UnauthenticatedBans.guild_id == guild_id).all()
users = prepare_guild_members_list(all_members, all_bans) users = prepare_guild_members_list(all_members, all_bans)
dbguild_dict = { dbguild_dict = {