title: AssertionError: `create()` did not return an object instance
body: <p>I am getting the error below while sending a request to a UserRegisterView:</p>
  <pre><code>  File &quot;/Users/MichaelAjanaku/Desktop/test/afrocode/lib/python3.6/site-packages/rest_framework/views.py&quot;, line 506, in dispatch
      response = handler(request, *args, **kwargs)
    File &quot;/Users/MichaelAjanaku/Desktop/test/leave/views.py&quot;, line 22, in post
      serializer.save()
    File &quot;/Users/MichaelAjanaku/Desktop/test/afrocode/lib/python3.6/site-packages/rest_framework/serializers.py&quot;, line 207, in save
      '`create()` did not return an object instance.'
  AssertionError: `create()` did not return an object instance.
  </code></pre>
  <p>I don't know why such occurs. Here is my views.py:</p>
  <pre><code>class UserRegistrationView(CreateAPIView):
      serializer_class = UserRegistrationSerializer
      permission_classes = (AllowAny,)
  
      def post(self, request):
          serializer = self.serializer_class(data= request.data)
          serializer.is_valid(raise_exception=True)
          serializer.save()
          status_code = status.HTTP_201_CREATED
          response = {
              'success' : 'True',
              'status code' : status_code,
              'message' : 'User registered successfully'
          }
  </code></pre>
  <p>and the serializers:</p>
  <pre><code>class UserRegistrationSerializer(serializers.ModelSerializer):
  
      profile = UserSerializer(required=False)
      class Meta:
          model = User
          fields = ('email', 'password','profile' )
          extra_kwargs = {'password': {'write_only' : True}}
  
      
      def create(self, validated_data):
          profile_data = validated_data.pop('profile')
          user = User.objects.create_user(**validated_data)
          UserProfile.objects.create(
              user = user,
              first_name = profile_data['first_name'],
              last_name= profile_data['last_name'],
                       )
  </code></pre>
  <p>Please what is causing the error? Thanks</p>