5👍
The int() function is throwing an exception because you are trying to convert something that is not a number.
I suggest that you might consider using debugging print statements to find out what plan’s and fiid’s are initally and how they change.
Another thing you can do is wrap the call to int() using try/catch
val='a'
try:
int_val = int(val)
except ValueError:
print("Failure w/ value " + val)
3👍
Somewhere in that chain of calls, you’re passing an empty string which the code is then trying to convert to an integer. Log your input at the time to track it down.
- [Django]-How can I centralize URLs in Django templates?
- [Django]-Django Rest Framework regroup queryset by a category
- [Django]-Django queryset specific order by based on values of foreign key
- [Django]-Auto_now field is not updating with updating using filter()
0👍
Suggest you look at the values of plan
and fiid
, because either plan
or fiid
is not set to the value that you think.
- [Django]-Cannot urlencode() after storing QueryDict in session
- [Django]-Django 1.7 and smart, deep, filtered aggregations
- [Django]-Django Model not automatically creating ID
- [Django]-`lookup_field` doesn't work on `ListAPIView`
0👍
For me, I had to delete the migration folder and follow the steps in the top answer in this link and then re-run the migrations, and then the error went away and it worked.
- [Django]-Inheritance model update to its parent model
- [Django]-Where is documentation about the "parser" methods?
- [Django]-Can I query a secondary database from Django without ORM?