You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to create Url model with model_bakery without any parameters, I have got this error:
django.db.utils.DataError: value too long for type character varying(255)
The problem is, that pattern parameter (generated by model_bakery) gets lengthen in save() method by leading / and doesn't fit in the field anymore.
The solution is very simple: add default="" to the pattern field.
There is also second problem with the save method - if user enters pattern exactly 255 characters long in the admin, it will throw an exception rather than showing validation error.
The text was updated successfully, but these errors were encountered:
If I try to create Url model with model_bakery without any parameters, I have got this error:
The problem is, that
pattern
parameter (generated by model_bakery) gets lengthen insave()
method by leading/
and doesn't fit in the field anymore.The solution is very simple: add
default=""
to the pattern field.There is also second problem with the save method - if user enters pattern exactly 255 characters long in the admin, it will throw an exception rather than showing validation error.
The text was updated successfully, but these errors were encountered: