diff --git a/nonebot_plugin_tetris_stats/db/models.py b/nonebot_plugin_tetris_stats/db/models.py index ab09654..888ea14 100644 --- a/nonebot_plugin_tetris_stats/db/models.py +++ b/nonebot_plugin_tetris_stats/db/models.py @@ -26,7 +26,7 @@ class PydanticType(TypeDecorator): def process_bind_param(self, value: Any | None, dialect: Dialect) -> str: # 将 Pydantic 模型实例转换为 JSON if isinstance(value, tuple(self.get_model())): - return value.json() # type: ignore[union-attr] + return value.json(by_alias=True) # type: ignore[union-attr] raise TypeError @override