8👍
The problem ended up being that I was not passing a value for the integer field last_4_digits. It seems that this happens if you have a integerField with blank=True and don’t submit a value for it.
3👍
I experienced this error message as well in a Django population script with a ForeignKey having both blank=True
and null=True
, and passing ''
as argument to objects.get_or_create()
.
I fixed the issue by passing argument=None
. The None
part is the clue.
- [Django]-Set language of template in Django by clicking on <a> link from Bootstrap Dropdown menu
- [Django]-Single Django Application, Multiple Instances
- [Django]-Django-cors-headers does not allow a request from an allowed origin
0👍
This type of error is occur when an “Integer” inupt contains empty or string value like ” ‘id’ “, ” ‘.’.”, etc.
So, you have to find out that for what this type of input you get.
- [Django]-How can I add a class atribute to django auth login form?
- [Django]-Access Django Test Database
- [Django]-Django: get_perm(permision_string)
- [Django]-Python left() equivalent?
- [Django]-How to avoid repeated values retrieved from database?
0👍
The problem for me was that I was using required=False, disabled=True,
that didn’t send the data to the server for that field. I changed to
amount_payments = CharField(widget=TextInput(attrs={'readonly': 'readonly'}))
- [Django]-Django always capitalizes a model's verbose name in admin index page
- [Django]-When does the queryset use its _result_cache, not hitting the database?