From c9394179c25e83f999277b8a2afe0fbd47559bf0 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 19 Dec 2024 17:12:32 +0800 Subject: [PATCH] fix: pydantic v2 --- models/head_icon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/head_icon.py b/models/head_icon.py index fdb02eb..342f965 100644 --- a/models/head_icon.py +++ b/models/head_icon.py @@ -1,6 +1,6 @@ from typing import List, Optional -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict class HeadIcon(BaseModel): @@ -24,6 +24,8 @@ class HeadIcon(BaseModel): class ForHash(BaseModel): + model_config = ConfigDict(coerce_numbers_to_str=True, arbitrary_types_allowed=True) + Hash: str