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.
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 lengthNone
. I suggest we add a check ifmax_length
isNone
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 nomax_length
on Postgres.Expected behavior I get some kind of string returned.
Versions