We are having this application:
Our user model consists of multiple fields and one of them is the organization name.
The organization name is optional and for some reason, it is still asking on the user creation step and it throws a strange error.
Can you please take a closer look at what might be the problem?
Frontend dev: Michael Benedict Samonte
Backend: Goran Markovic
Hi Mekin… Could you please post the API call and the error response that the backend sends you?
Obviously, if the call includes an access token, please obfuscate it.
@andresmachado You might want to take a look too.
Also, as a rule of thumb, you should avoid setting
TextField in Django models. Refer the following snippet from the Django Models reference:
null on string-based fields such as
TextField . If a string-based field has
null=True , that means it has two possible values for “no data”:
NULL , and the empty string. In most cases, it’s redundant to have two possible values for “no data;” the Django convention is to use the empty string, not
NULL . One exception is when a
CharField has both
blank=True set. In this situation,
null=True is required to avoid unique constraint violations when saving multiple objects with blank values.