We shall not divide by zero

This commit is contained in:
Iuri Guilherme 2021-11-16 23:49:42 -03:00 committed by GitHub
parent 18c9cee540
commit d7e278ebf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,7 +126,7 @@ def stats(bot, update):
)
n = us.first_places
m = round((us.first_places / us.games_played) * 100)
m = round((us.first_places / us.games_played) * 100) if games_played else 0
stats_text.append(
_("{number} first place ({percent}%)",
"{number} first places ({percent}%)",