From ccd4dfa6eec8b194276de40cca79aa8b06ec802d Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 19 Jun 2022 23:40:07 +0200 Subject: [PATCH] fix my upsoren being added before OP's upsoren --- files/routes/posts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/files/routes/posts.py b/files/routes/posts.py index b5d9ff796..987d7f694 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1266,6 +1266,7 @@ def submit_post(v, sub=None): g.db.add(post) if post.sub and AEVANN_ID and v.id != AEVANN_ID: + g.db.flush() autovote = Vote(user_id=AEVANN_ID, submission_id=post.id, vote_type=1) g.db.add(autovote) v.coins += 1