model-bakers/model_bakery

`_bulk_create` without `_quantity` will be ignored

jedie opened this issue · 0 comments

jedie commented

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:

if _quantity and _bulk_create:
return bulk_create(baker, _quantity, _save_kwargs=_save_kwargs, **attrs)

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

  • Model Bakery 1.17.0