mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
Fix tetrio v2 template crash for users with PERCENTILEINVARIANT (rank_type=7) achievements
Co-authored-by: shoucandanghehe <51957264+shoucandanghehe@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,7 @@ from ....utils.render.schemas.v2.tetrio.user.info import (
|
|||||||
Zenith,
|
Zenith,
|
||||||
)
|
)
|
||||||
from ..api import Player
|
from ..api import Player
|
||||||
|
from ..api.schemas.summaries.achievements import RankType
|
||||||
from ..api.schemas.summaries.league import InvalidData, NeverPlayedData, NeverRatedData
|
from ..api.schemas.summaries.league import InvalidData, NeverPlayedData, NeverRatedData
|
||||||
from .tools import flow_to_history, handling_special_value
|
from .tools import flow_to_history, handling_special_value
|
||||||
|
|
||||||
@@ -122,6 +123,7 @@ async def make_query_image_v2(player: Player) -> bytes:
|
|||||||
total=i.total,
|
total=i.total,
|
||||||
)
|
)
|
||||||
for i in achievements.data
|
for i in achievements.data
|
||||||
|
if i.rank_type != RankType.PERCENTILEINVARIANT
|
||||||
],
|
],
|
||||||
playtime=play_time,
|
playtime=play_time,
|
||||||
join_at=user_info.data.ts,
|
join_at=user_info.data.ts,
|
||||||
|
|||||||
Reference in New Issue
Block a user