title: How to push flat data with POST in nested serializer DRF
body: <p>I have an API that can create testruns, but I need an instrument serial number to create it.</p>
  
  <p>I would like to be able to have this POST request :</p>
  
  <pre><code>{
      "serial_number":"4331214L"
      "operator": "John Doe"
  }
  </code></pre>
  
  <p>But, right now I have to do :</p>
  
  <pre><code>{
      "instrument": {
          "serial_number":"4331214L"
      },
      "operator": "John Doe"
  }
  </code></pre>
  
  <p>current models: </p>
  
  <pre><code>class InstrumentModel(models.Model):
      class Meta:
          db_table = "instruments"
          verbose_name = "Instrument"
  
      serial_number = models.CharField(max_length=10, unique=True, db_index=True)
  
      def __str__(self):
          return self.serial_number
  
  
  class TestRun(models.Model):
      class Meta:
          db_table = "test_runs"
          verbose_name = "Test run"
  
      operator = models.CharField(max_length=70)
      instrument = models.ForeignKey(InstrumentModel, related_name="instruments", db_column="instrument", on_delete=models.CASCADE)
      created_at = models.DateTimeField(db_index=True, default=timezone.now)
  </code></pre>
  
  <p>I tried with the depth meta field. That doesn't work. Maybe it's not at the serializer level?</p>
  
  <pre><code>class TestRunSerializer(serializers.ModelSerializer):
      instrument = InstrumentSerializer()
  
      class Meta:
          model = TestRun
          fields = ('operator', 'instrument')
          depth = 1
  
      def create(self, validated_data):
          serial_number = validated_data.pop('serial_number')
          instrument, _ = InstrumentModel.objects.get_or_create(serial_number=serial_number)
          return TestRun.objects.create(**validated_data, instrument=instrument)
  </code></pre>