title: Why Django's OneToOneField returns 500 if relation aready exists
body: <p>In a Django REST Framework POST view, is there any way to avoid an <strong>HTTP 500</strong> if the OneToOneField relation already exists?</p>
  <p>Instead, it would be great to get an <strong>HTTP 400</strong>.</p>
  <p><strong>models.py</strong></p>
  <pre><code>class Club(TimeStampModel):
      owner = models.OneToOneField(User, on_delete=models.PROTECT)
      name = models.CharField(max_length=255, unique=True)
  </code></pre>
  <p><strong>serializers.py</strong></p>
  <pre><code>class ClubSerializer(serializers.ModelSerializer):
      class Meta:
          model = Club
          fields = '__all__'
          read_only_fields = ['owner', 'active']
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>class ClubRegistrationView(generics.CreateAPIView):
      queryset = Club.objects.all()
      serializer_class = ClubSerializer
      permission_classes = [IsAuthenticated]
  
      def perform_create(self, serializer):
          serializer.save(owner=self.request.user)
  </code></pre>
  <p>Thanks.</p>