diff --git a/files/classes/comment.py b/files/classes/comment.py index d19e92a11..74701e789 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -332,7 +332,8 @@ class Comment(Base): if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 60: ti = int(time.time() - self.created_utc)/10 maxupvotes = min(ti, 31) - if self.upvotes < maxupvotes: + rand = random.randint(1, maxupvotes) + if self.upvotes < rand: self.upvotes += randint(0, 5) g.db.add(self) g.db.commit() diff --git a/files/classes/submission.py b/files/classes/submission.py index f6815bfb9..d6ffaeb7e 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -336,7 +336,7 @@ class Submission(Base): maxupvotes = min(ti, 27) rand = random.randint(1, maxupvotes) if self.upvotes < rand: - self.upvotes += random.randint(0,5) + self.upvotes += random.randint(0, 5) g.db.add(self) g.db.commit()