Do you got this error while doing filter QuerySet in Django:
1 | ValueError: invalid literal for int() with base 10: |
It just simply mistake that may you usually do by filter() with args or kwargs.
This is some bad code :
1 2 | kwargs = {‘created__year’: 2012, ‘name’: ‘yodi’} Insurance.objects.filter(kwargs) |
No? Still can’t figure out where is the problem?
1 2 | kwargs = {‘created__year’: 2012, ‘name’: ‘yodi’} Insurance.objects.filter(**kwargs) |
See the difference? When you got this problem, it’s mean you tired. Get a rest 🙂