String generation fails on Django 4.2 for CharField(max_length=None)
knyghty opened this issue · 0 comments
knyghty commented
Describe the issue
CharField can have max_length=None
when using Postgres and Django 4.2+. model bakery isn't aware of this and will try to generate a string of length None
. I suggest we add a check if max_length
is None
and if so, we just use a static range of 100 chars or so.
To Reproduce
Try to generate a string when using CharField()
with no max_length
on Postgres.
Expected behavior
I get some kind of string returned.
Versions
- Python: 3.11
- Django 4.2
- Model Bakery 1.11.0