title: Update if "Email already exist" in Django Rest Framework
body: <p>I have a Candidates object model in Django Application, who I get from a form in a Front End. </p>
  
  <p>If this Candidate send personal data again with the same email, DRF response <em>{"email":["A user with that email already exists."]}</em> and not save the form. </p>
  
  <p>The idea is, if this candidate send the form again with personal email and I have saved it in my database, I will update personal data of this candidate.  </p>
  
  <p>I tried with:</p>
  
  <p>My view: </p>
  
  <pre><code>@csrf_exempt
  @api_view(['GET', 'POST','PATCH'])
  def CandidatesCreate(request, *args, **kwargs):
  parser_classes = (FileUploadParser,)
  
  if request.method == 'PATCH' or request.method == 'POST':
  
      serializer = CandidatesSerializer(data=request.data)
      if serializer.is_valid():
          instance, created = serializer.get_or_create()
          if not created:
              serializer.update(instance, serializer.validated_data)
          return Response(serializer.data, status=status.HTTP_202_ACCEPTED)
      return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>My Serializer</p>
  
  <pre><code>class CandidatesSerializer(serializers.ModelSerializer):
  
  cv = serializers.FileField(required=False,max_length=None, use_url=True)
  
  class Meta:
      model = Candidates
      fields = (
          'pk', 
          'user',
          'name', 
          'email', 
          'whatever',
          'whatever'
          )
  </code></pre>
  
  <p>However, it not working.I am not be sure if get_or_create() was depreciated, to be honest. I not found real information about it. </p>