title: Django Rest Framework - Column 'brith_date' cannot be null (when it isn't)
body: <p>I'm getting the following error when posting to my api to create a user:</p>
  
  <p><a href="https://i.stack.imgur.com/wh8Hw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wh8Hw.png" alt="postman integrity error"></a></p>
  
  <p>I'm using the following function:</p>
  
  <pre><code>def create(self, validated_data):
          user_data = validated_data.pop('user')
          print(validated_data)
          user = User.objects.create(**user_data)
          validated_data.user_id = user.id
          print(validated_data)
          profile = Profile.objects.create(**validated_data)
          return profile
  </code></pre>
  
  <p>My user is created perfectly but the error comes up when I'm trying to create the profile.</p>
  
  <p>validated_data contains the following after the user pop:</p>
  
  <pre><code>{'phone': '81156598', 'birth_date': datetime.date(2017, 6, 29)}
  </code></pre>
  
  <p>I'm adding afterwards the user_id from the user that was created and passing that in my <code>Profile.objects.create(**validated_data)</code> but I get the birth_date cannot be null error. Do I need to get all my date formats from a post and then send it back to validated_data? There should be another way shouldn't it?</p>
  
  <p>Thank you</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>This is the profile model</p>
  
  <pre><code>from django.db import models
  from django.contrib.auth.models import User
  from django.db.models.signals import post_save
  from django.dispatch import receiver
  
  class Profile(models.Model):
  
      phone = models.CharField(max_length=255, blank=False)
      birth_date = models.DateField(blank=False)
      user = models.OneToOneField(User, on_delete=models.CASCADE)
  
      @receiver(post_save, sender=User)
      def create_user_profile(sender, instance, created, **kwargs):
          if created:
              Profile.objects.create(user=instance)
  
      @receiver(post_save, sender=User)
      def save_user_profile(sender, instance, **kwargs):
          instance.profile.save()
  
      def __str__(self):
          return "{}".format(self.user.username)
  </code></pre>