model-bakers / model_bakery

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

`_bulk_create` without `_quantity` will be ignored #462

Open jedie opened 1 year ago

jedie commented 1 year ago

e.g.: baker.make(MyModel, _bulk_create=True) will no use bulk create, because _quantity can't be None, so _bulk_create will be just ignored, see:

https://github.com/model-bakers/model_bakery/blob/38d2dd797832adcd2523048830d0843732acd9c4/model_bakery/baker.py#L126-L127

I think it's not very much to do, to support this case, isn't it? I can create a PR, if this is ok.

Versions