diff --git a/rest_auth/registration/views.py b/rest_auth/registration/views.py index 13eff9f..291a63c 100644 --- a/rest_auth/registration/views.py +++ b/rest_auth/registration/views.py @@ -69,8 +69,11 @@ class VerifyEmailView(APIView, ConfirmEmailView): permission_classes = (AllowAny,) allowed_methods = ('POST', 'OPTIONS', 'HEAD') + def get_serializer(self, *args, **kwargs): + return VerifyEmailSerializer(*args, **kwargs) + def post(self, request, *args, **kwargs): - serializer = VerifyEmailSerializer(data=request.data) + serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) self.kwargs['key'] = serializer.validated_data['key'] confirmation = self.get_object()