title: Django Rest Framework - Getting a model instance after serialization
body: <p>I've made a serializer, and I'm trying to create a <code>Booking</code> instance from the booking field in the serializer, after I've validated the POST data. However, because the <code>Booking</code> object has foreign keys, I'm getting the error: </p>
  
  <blockquote>
    <p>ValueError: Cannot assign "4": "Booking.activity" must be a "Activity" instance.</p>
  </blockquote>
  
  <p>Here's my view function:</p>
  
  <pre><code>@api_view(['POST'])
  def customer_charge(request):
      serializer = ChargeCustomerRequestSerializer(data=request.data)
      serializer.is_valid(raise_exception=True)
  
      # trying to create an instance using the ReturnDict from the serializer
      booking = Booking(**serializer.data['booking'])
      booking.save()
  </code></pre>
  
  <p>Serializers.py where <code>BookingSerializer</code> is a ModelSerializer</p>
  
  <pre><code>class ChargeCustomerRequestSerializer(serializers.Serializer):
      booking = BookingSerializer()
      customer = serializers.CharField(max_length=255)
  
  class BookingSerializer(serializers.ModelSerializer):
      class Meta:
          model = Booking
          fields = '__all__'
          # I wanted to view the instances with the nested information available
          # but this breaks the serializer validation if it's just given a foreign key
          # depth = 1
  </code></pre>
  
  <p>What is the correct way to create a model instance from a nested serializer?</p>