Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydantic migration #156

Merged
merged 2 commits into from
Sep 14, 2023
Merged

pydantic migration #156

merged 2 commits into from
Sep 14, 2023

Conversation

LeoQuote
Copy link
Contributor

@LeoQuote LeoQuote commented Sep 14, 2023

  1. 请求体中, 可选的值要设置 = None https://docs.pydantic.dev/latest/migration/#changes-to-pydanticbasemodel
  2. orm_mode 已经凉了, 换成 model_validate

@QSummerY
Copy link
Contributor

PolicyFlowResp 和 TicketPolicyResp 两个响应体是不是不用改,表里面有设置default,只要可以为None就可以?

@LeoQuote LeoQuote merged commit 691d392 into douban:master Sep 14, 2023
2 checks passed
@LeoQuote LeoQuote deleted the pydantic-migration branch September 14, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants