Open yinkh opened 10 months ago
fix https://github.com/tortoise/tortoise-orm/issues/1462
use pydantic_model_creator with fields.TimeDeltaField in 0.19.3 will get error
pydantic.error_wrappers.ValidationError: 1 validation error for DemoSchema usage_time value is not None (type=type_error.not_none)
https://github.com/tortoise/tortoise-orm/assets/8170059/fa70fa98-0ebe-4c97-80da-2537ce0ac724
python3.9 pydantic 1.10.12 tortoise-orm 0.19.3
tortoise/fields/data.py:501
Please add testcase reproducing issue to tests/contrib/test_pydantic.py
tests/contrib/test_pydantic.py
Description
fix https://github.com/tortoise/tortoise-orm/issues/1462
Motivation and Context
use pydantic_model_creator with fields.TimeDeltaField in 0.19.3 will get error
How Has This Been Tested?
https://github.com/tortoise/tortoise-orm/assets/8170059/fa70fa98-0ebe-4c97-80da-2537ce0ac724
python3.9 pydantic 1.10.12 tortoise-orm 0.19.3
tortoise/fields/data.py:501
Checklist: