Closed majorgilles closed 2 months ago
Describe the issue Model bakery seems to ignore the new django 5.+ field setting "db_default".
To Reproduce
Original version of a field:
null=False, default=20, help_text="In percentage (0-100)" )
Switching to db_default:
null=False, db_default=20, help_text="In percentage (0-100)" )
Baked model using this field assigns a random positive integer value
I have to explicitly set the value in the Recipe for it to work
Expected behavior db_default parameter should be used as default in the recipe just as former default parameter was used instead of a random int
Versions
Describe the issue Model bakery seems to ignore the new django 5.+ field setting "db_default".
To Reproduce
Original version of a field:
Switching to db_default:
Baked model using this field assigns a random positive integer value
I have to explicitly set the value in the Recipe for it to work
Expected behavior db_default parameter should be used as default in the recipe just as former default parameter was used instead of a random int
Versions