From 742a3698ea217b982abc927ad4be68f728c6c2e3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 6 Jul 2022 13:00:28 +0200 Subject: [PATCH] fix my vote being above OP's vote --- files/routes/posts.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index dc87576f2..feb246b91 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1201,13 +1201,17 @@ def submit_post(v, sub=None): if request.host == 'rdrama.net' and post.sub and post.sub not in ('dankchristianmemes','fatpeoplehate','braincels','truth') and v.id != AEVANN_ID: g.db.flush() - autovote = Vote(user_id=AEVANN_ID, submission_id=post.id, vote_type=1) + autovote = Vote( + user_id=AEVANN_ID, + submission_id=post.id, + vote_type=1 + ) + autovote.created_utc += 1 g.db.add(autovote) v.coins += 1 v.truecoins += 1 g.db.add(v) post.upvotes += 1 - post.created_utc += 1 g.db.add(post) cache.delete_memoized(frontlist)