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
At least when specifying your own exclude in model_dump the exclude attribute of fields is ignored.
I worked around by injecting the field names manually in exclude.
It would be nice if the exclude attribute could be honored even when the exclude parameter is specified in model_dump
Note: I use FieldInfo directly, see the edgy db system or better the PR:
Note2: it would be even better to have the exclude attribute for ComputedFieldInfo, despite the unlogic in it (computed_field is used for including a method in a model_dump). But for library authors it improves the usability
Initial Checks
Description
At least when specifying your own exclude in model_dump the exclude attribute of fields is ignored.
I worked around by injecting the field names manually in exclude.
It would be nice if the exclude attribute could be honored even when the exclude parameter is specified in model_dump
Note: I use FieldInfo directly, see the edgy db system or better the PR:
dymmond/edgy#89
Note2: it would be even better to have the exclude attribute for ComputedFieldInfo, despite the unlogic in it (computed_field is used for including a method in a model_dump). But for library authors it improves the usability
Example Code
No response
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: