title: getting duplicate entry error Django
body: <p>Hi i am getting the duplicate entry when i am running this code but cant sure why it is happening Below is the code</p>
  
  <pre><code>def match_domain(request):
      user_domain_array = ['rohit@ghrix.com','rahul@ghrix.com','rishi@ghrix.com']
      getclientdomain = client_domain.objects.all()
      for i in getclientdomain:
              for u in user_domain_array : 
                  if i.client_domain in u :
                      saveuser = User(email = u)
                      saveuser.save()
                      #return HttpResponse(u)
                  else :
                      return HttpResponse("no")
  </code></pre>
  
  <p>getclientdomain  has <strong>one</strong> entry in <strong>database</strong> with the value of  <strong>ghrix.com</strong>  , it inserts the <strong>first</strong> element from the array to <strong>database</strong>  and after that throwing the <strong>duplicate</strong> entry error
  please suggest me where i am doing a mistake .</p>