You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Behaviour should be consistent across all backends when possible.
Requirement of fields should be determined by pydantic model as its primary function is validation.
Currently, marking a field of pydantic model as Optional or setting a default value doesn't allow skipping that field when sending a request (for backends other than tortoise and ormar).
Making this change would allow to both keeping the current behaviour and enabling partial updates depending on your pydantic model.
I can create a pull request for this if it gets approved. I have already tested it in my local environment and doesn't seem to break anything else.
The text was updated successfully, but these errors were encountered:
Currently, only tortoise and ormar backends are allowing partial updates. See relevant line for tortoise below.
fastapi-crudrouter/fastapi_crudrouter/core/tortoise.py
Line 95 in 66fd32f
Behaviour should be consistent across all backends when possible.
Requirement of fields should be determined by pydantic model as its primary function is validation.
Currently, marking a field of pydantic model as
Optional
or setting a default value doesn't allow skipping that field when sending a request (for backends other than tortoise and ormar).Making this change would allow to both keeping the current behaviour and enabling partial updates depending on your pydantic model.
I can create a pull request for this if it gets approved. I have already tested it in my local environment and doesn't seem to break anything else.
The text was updated successfully, but these errors were encountered: