Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_bulk_create without _quantity will be ignored #462

Open
jedie opened this issue Nov 2, 2023 · 0 comments
Open

_bulk_create without _quantity will be ignored #462

jedie opened this issue Nov 2, 2023 · 0 comments

Comments

@jedie
Copy link

jedie commented Nov 2, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant