Changed
- Fix reverse one-to-one recipes creating extra parent objects. Each parent gets a distinct related object, with nested recipe behavior preserved. Parent validation (with
_full_clean=True) and save hooks run before the reverse object exists. Withprepare(_save_related=True), reverse children remain unsaved; recipe preparation ignores creation-only options (#97). - Fix
ValueErrorwhen using_fill_optional=Trueon a model with aForeignKey/OneToOneFieldthat has adefault. The field's raw default (a pk) is now assigned via the attribute name (e.g.related_id) instead of the relation name, matching Django's own default-handling behavior.
💙 Thank you to our sponsors for supporting Model Bakery’s maintenance.
If Model Bakery saves you time, consider supporting it through GitHub Sponsors or Ko-fi. Your support helps fund bug fixes, reviews, and compatibility with new Django and Python versions.
Using Model Bakery at work? Tidelift offers an enterprise subscription that helps organizations manage the security, licensing, and maintenance of their open source dependencies while supporting maintainers.