fsdfsd
This commit is contained in:
parent
0496e92f5b
commit
4e55a649c0
6 changed files with 27 additions and 3 deletions
|
@ -335,8 +335,11 @@ class Submission(Base):
|
|||
maxupvotes = min(ti, 27)
|
||||
rand = random.randint(0, maxupvotes)
|
||||
if self.upvotes < rand:
|
||||
self.upvotes += random.randint(0, 3)
|
||||
amount = random.randint(0, 3)
|
||||
self.upvotes += amount
|
||||
g.db.add(self)
|
||||
self.author.coins += amount
|
||||
g.db.add(self.author)
|
||||
g.db.commit()
|
||||
|
||||
return body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue