fix my vote being above OP's vote

remotes/1693045480750635534/spooky-22
Aevann1 2022-07-06 13:00:28 +02:00
parent 4057711c83
commit 742a3698ea
1 changed files with 6 additions and 2 deletions

View File

@ -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: 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() 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) g.db.add(autovote)
v.coins += 1 v.coins += 1
v.truecoins += 1 v.truecoins += 1
g.db.add(v) g.db.add(v)
post.upvotes += 1 post.upvotes += 1
post.created_utc += 1
g.db.add(post) g.db.add(post)
cache.delete_memoized(frontlist) cache.delete_memoized(frontlist)