Extra field in custom registration in DRF won't save

Vicente G. Reyes - Aug 15 '23 - - Dev Community

I created a custom serializer that extends dj_rest_auth's RegisterSerializer, added the extra user_type field, overrode the get_cleaned_data method to include the user_type in the cleaned data then configured the custom registration serializer used for registration.

Here's my code:

class CustomRegisterSerializer(RegisterSerializer)
    user_type = serializers.ChoiceField(choices=[('seeker', 'Seeker'), ('recruiter', 'Recruiter')])

    class Meta:
        model
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player