gffg
This commit is contained in:
parent
4509c25f73
commit
24b0722e5c
2 changed files with 6 additions and 2 deletions
|
@ -186,9 +186,11 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
|||
if random.random() < 0.004:
|
||||
for post in posts:
|
||||
if post.author and post.author.shadowbanned:
|
||||
rand = random.randint(5,20)
|
||||
if post.score > rand: continue
|
||||
rand = random.randint(500,1400)
|
||||
vote = Vote(user_id=rand,
|
||||
vote_type=random.choice([-1, 1]),
|
||||
vote_type=random.choice([-1, 1, 1, 1, 1]),
|
||||
submission_id=post.id)
|
||||
g.db.add(vote)
|
||||
try: g.db.flush()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue