🐛 修复 top 没有 recent games 时 出现 0 长 list 的 bug

This commit is contained in:
2024-08-15 17:39:28 +08:00
parent d35469cdef
commit 3fe5a19c4a

View File

@@ -68,4 +68,4 @@ class Player:
total: list[Data] = []
for _, value in dataframe.iterrows():
total.append(Data(lpm=value['lpm'], apm=value['apm']))
return UserProfile(user_name=user_name, today=today, total=total)
return UserProfile(user_name=user_name, today=today, total=total or None)