forked from MarseyWorld/MarseyWorld
restore pizza autoupvotes on posts
parent
8e74171d9d
commit
e4c0f1b4b3
|
@ -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()
|
v.post_count = g.db.query(Submission).filter_by(author_id=v.id, deleted_utc=0).count()
|
||||||
g.db.add(v)
|
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(frontlist)
|
||||||
cache.delete_memoized(User.userpagelisting)
|
cache.delete_memoized(User.userpagelisting)
|
||||||
|
|
Loading…
Reference in New Issue