DEV Community

Vicente G. Reyes
Vicente G. Reyes

Posted on

Extra field in custom registration in DRF won't save

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

Top comments (0)