From a1043372040860f8b6038ef2ea4f7630e07f3495 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 25 Jul 2023 20:50:07 +0300 Subject: [PATCH] move execute_snappy to the bottom and see what happens --- files/routes/posts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index a99d69895..67ed72221 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -715,9 +715,6 @@ def submit_post(v:User, sub=None): autojanny.comment_count += 1 g.db.add(autojanny) - if not p.private and not (p.sub and g.db.query(Exile.user_id).filter_by(user_id=SNAPPY_ID, sub=p.sub).one_or_none()): - execute_snappy(p, v) - v.post_count = g.db.query(Post).filter_by(author_id=v.id, deleted_utc=0).count() g.db.add(v) @@ -740,6 +737,9 @@ def submit_post(v:User, sub=None): for key in redis_instance.scan_iter(key_pattern): redis_instance.delete(key) + if not p.private: + execute_snappy(p, v) + if v.client: return p.json else: p.voted = 1