From 17400bc852ab43afdab73b775c337aaebe78efce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 07:07:22 +0000 Subject: [PATCH] Fix tetrio v2 template crash for users with PERCENTILEINVARIANT (rank_type=7) achievements Co-authored-by: shoucandanghehe <51957264+shoucandanghehe@users.noreply.github.com> --- nonebot_plugin_tetris_stats/games/tetrio/query/v2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nonebot_plugin_tetris_stats/games/tetrio/query/v2.py b/nonebot_plugin_tetris_stats/games/tetrio/query/v2.py index e230693..83396c8 100644 --- a/nonebot_plugin_tetris_stats/games/tetrio/query/v2.py +++ b/nonebot_plugin_tetris_stats/games/tetrio/query/v2.py @@ -26,6 +26,7 @@ from ....utils.render.schemas.v2.tetrio.user.info import ( Zenith, ) from ..api import Player +from ..api.schemas.summaries.achievements import RankType from ..api.schemas.summaries.league import InvalidData, NeverPlayedData, NeverRatedData 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, ) for i in achievements.data + if i.rank_type != RankType.PERCENTILEINVARIANT ], playtime=play_time, join_at=user_info.data.ts,