model-bakers / model_bakery

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

[ BUG ] Unexpected kwargs `_created_files` passed to `gen_from_list` function. #500

Closed Occy88 closed 2 months ago

Occy88 commented 2 months ago

Describe the issue

E       TypeError: gen_from_list.<locals>.<lambda>() got an unexpected keyword argument '_create_files'

I would have fixed this however as this is touching a generator & it looks like such big mistake (forcing kwargs into a function that doesn't take any) that I'm doubting if it's actually my use of this that was wrong.

This only happened once I added a choices with a list of tuples on the field in question.

To Reproduce

Screenshot 2024-09-05 at 16 57 34

Expected behavior Not crashing

Versions