restore pizza autoupvotes on posts

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-01 22:07:08 +02:00
parent 8e74171d9d
commit e4c0f1b4b3
1 changed files with 9 additions and 1 deletions

View File

@ -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)