1👍
✅
sounds like the object returned by form.cleaned_data['category']
is a category object, not a number.
If that’s the case, just do category = form.cleaned_data['category']
print it to be sure.
Source:stackexchange.com