1👍
✅
Your comment says “Since we need to set the user attribute ourselves, we set commit=False”, but you don’t actually do that. It should be:
profile = profile_form.save(commit=False)
In future, please cut your code down to the minimum that exhibits your problem: the error was occurring on register, you didn’t need to show all the code relating to categories.
Source:stackexchange.com