From e4c0f1b4b375b443d0072e622fa667dcaca56b60 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 1 Sep 2022 22:07:08 +0200 Subject: [PATCH] restore pizza autoupvotes on posts --- files/routes/posts.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 6763fea9f..82dcdd231 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1057,7 +1057,15 @@ def submit_post(v, sub=None): v.post_count = g.db.query(Submission).filter_by(author_id=v.id, deleted_utc=0).count() g.db.add(v) - upvoters = (CARP_ID, 8094, 10881) + if v.id == PIZZASHILL_ID: + for uid in PIZZA_VOTERS: + autovote = Vote(user_id=uid, submission_id=post.id, vote_type=1) + g.db.add(autovote) + v.coins += 3 + v.truecoins += 3 + g.db.add(v) + post.upvotes += 3 + g.db.add(post) cache.delete_memoized(frontlist) cache.delete_memoized(User.userpagelisting)