🐛 修复对 Pydantic V1 的适配

This commit is contained in:
2024-04-30 02:27:08 +08:00
parent 5cb428ed71
commit 93b169fa40
2 changed files with 4 additions and 3 deletions

View File

@@ -155,8 +155,8 @@ class Processor(ProcessorMeta):
failover_code=[502],
failover_exc=(TimeoutException,),
)
self.processed_data.user_profile[params] = UserProfile.model_validate_json(
self.raw_response.user_profile[params]
self.processed_data.user_profile[params] = type_validate_json(
UserProfile, self.raw_response.user_profile[params]
)
return self.processed_data.user_profile[params]