[Answer]-Int() argument must be a string or a number, not 'Category'

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.

Leave a comment