forked from rDrama/rDrama
1
0
Fork 0

handle 500 error

master
Aevann 2023-08-24 09:22:10 +03:00
parent e99fe52ab0
commit 73e2e474b3
1 changed files with 4 additions and 0 deletions

View File

@ -183,6 +183,10 @@ def distribute(v, kind, option_id):
g.db.add(autojanny)
votes = option.votes
if not votes:
abort(400, "Nobody voted on that, it can't be the winner!")
coinsperperson = int(pool / len(votes))
text = f"You won {coinsperperson} coins betting on {parent.permalink} :marseyparty:"