From d5355c6a006f6b71784d1f0ce20a1e6937f8d6e8 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Wed, 12 Jun 2024 08:12:44 +0800 Subject: [PATCH] bad attitude users - filter by recently active --- app/admin/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/routes.py b/app/admin/routes.py index e3f5d9b2..54eef10b 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -538,7 +538,7 @@ def admin_users_trash(): users = users.order_by(User.reputation).paginate(page=page, per_page=1000, error_out=False) elif type == 'bad_attitude': users = users.filter(User.last_seen > utcnow() - timedelta(days=7)) - users = users.filter(User.attitude < 0.0) + users = users.filter(User.attitude < 0.0).filter(User.reputation < -10) users = users.order_by(User.attitude).paginate(page=page, per_page=1000, error_out=False) next_url = url_for('admin.admin_users_trash', page=users.next_num, search=search, local_remote=local_remote, type=type) if users.has_next else None