model-bakers / model_bakery

Object factory for Django
https://model-bakery.readthedocs.io/en/latest/
Other
846 stars 85 forks source link

Fix #479 -- Make sure `db_default` is being considered #502

Closed berinhard closed 2 months ago

berinhard commented 2 months ago

Closes https://github.com/model-bakers/model_bakery/issues/479

Describe the change This PR changes the Baker.generate_value method to also consider the values configured in Field.db_default.

berinhard commented 2 months ago

@amureki any instructions on how to fix the coverage issue on CI? This is kind of new to me, so I'm not familiar.

amureki commented 2 months ago

@amureki any instructions on how to fix the coverage issue on CI? This is kind of new to me, so I'm not familiar.

Yeah, after rebasing, it should upload coverage artifacts and show an html report.