From 1738f11f9c26ed6ac67bfe302d05a9f3decf72be Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 7 Mar 2023 02:46:09 +0200 Subject: [PATCH] put the abort after the printing in media_ratelimit --- files/helpers/media.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index cce2adca1..95efcc4ad 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -36,10 +36,10 @@ def media_ratelimit(v): t = time.time() - 86400 count = g.db.query(Media).filter(Media.user_id == v.id, Media.created_utc > t).count() if count > 50: - abort(500) print(STARS, flush=True) print(f'@{v.username} hit the 50 file daily limit!') print(STARS, flush=True) + abort(500) def process_files(files, v, body): if g.is_tor or not files.get("file"): return body