From ee3736ffed9b1924b39dbc95945ea326dcd1000b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 18 Sep 2021 15:16:40 +0200 Subject: [PATCH] sdf --- files/helpers/wrappers.py | 4 ---- files/routes/comments.py | 1 - 2 files changed, 5 deletions(-) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index a1e382ff09..f40a080d69 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -61,8 +61,6 @@ def check_ban_evade(v): post.is_banned=True post.ban_reason="ban evasion" g.db.add(post) - - g.db.flush() ma=ModAction( kind="ban_post", @@ -72,8 +70,6 @@ def check_ban_evade(v): ) g.db.add(ma) - g.db.flush() - for comment in g.db.query(Comment).options(lazyload('*')).filter_by(author_id=v.id).all(): if comment.is_banned: continue diff --git a/files/routes/comments.py b/files/routes/comments.py index 59cf01d6f0..5bea7dc683 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -322,7 +322,6 @@ def api_comment(v): basedguy.basedcount += 1 if pill: basedguy.pills += f"{pill.group(1)}, " g.db.add(basedguy) - g.db.flush() body2 = BASED_MSG.format(username=basedguy.username, basedcount=basedguy.basedcount, pills=basedguy.pills)