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
To add the field name to the exception that's raised when bakery can't handle a specific field type. Not having the field name in the exception forces the developer to inspect the model definition to figure out what's the name of the field they may want to add default values.
The ideal exception message could be something like:
TypeError: field field_name type <class 'markupfield.fields.MarkupField'> is not supported by baker.
Actual behavior
TypeError: <class 'markupfield.fields.MarkupField'> is not supported by baker.
Reproduction Steps
Install a thirdy party app which implements custom fields, define a model with an unsupported field type and try to call baker.make for that model.
Versions
Python: 3.9
Django: 3.2
Model Bakery: 1.3.2
The text was updated successfully, but these errors were encountered:
Expected behavior
To add the field name to the exception that's raised when bakery can't handle a specific field type. Not having the field name in the exception forces the developer to inspect the model definition to figure out what's the name of the field they may want to add default values.
The ideal exception message could be something like:
Actual behavior
Reproduction Steps
Install a thirdy party app which implements custom fields, define a model with an unsupported field type and try to call
baker.make
for that model.Versions
Python: 3.9
Django: 3.2
Model Bakery: 1.3.2
The text was updated successfully, but these errors were encountered: