moderation search local / remote filter fixes #229

This commit is contained in:
rimu 2024-06-27 15:38:10 +08:00
parent 0912555d4f
commit 5554a78856
2 changed files with 5 additions and 3 deletions

View file

@ -880,9 +880,9 @@ def admin_reports():
reports = Report.query.filter(or_(Report.status == REPORT_STATE_NEW, Report.status == REPORT_STATE_ESCALATED))
if local_remote == 'local':
reports = reports.filter_by(ap_id=None)
reports = reports.filter_by(source_instance_id=1)
if local_remote == 'remote':
reports = reports.filter(Report.ap_id != None)
reports = reports.filter(Report.source_instance_id != 1)
reports = reports.order_by(desc(Report.created_at)).paginate(page=page, per_page=1000, error_out=False)
next_url = url_for('admin.admin_reports', page=reports.next_num) if reports.has_next else None

View file

@ -358,7 +358,9 @@ def about_page():
community_amount = local_communities()
instance = Instance.query.filter_by(id=1).first()
return render_template('about.html', user_amount=user_amount, mau=MAU, posts_amount=posts_amount, domains_amount=domains_amount, community_amount=community_amount, instance=instance, admins=admins, staff=staff)
return render_template('about.html', user_amount=user_amount, mau=MAU, posts_amount=posts_amount,
domains_amount=domains_amount, community_amount=community_amount, instance=instance,
admins=admins, staff=staff)
@bp.route('/privacy')