fix: Ensure ranking conversion handles string input
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ching L 2025-03-07 11:24:59 +08:00
parent dfaa0720ee
commit 2f534829e1

View File

@ -39,6 +39,7 @@ def get_ranking(ranking_int):
# (10-15: Herald, 20-25: Guardian, 30-35: Crusader, 40-45: Archon, 50-55: Legend, 60-65: Ancient, 70-75: Divine, 80-85: Immortal).
if not ranking_int:
return ''
ranking_int = int(ranking_int)
stars = ranking_int % 10
if ranking_int < 20:
return '先锋 %s' % stars