title: get_or_create returning error that multiple value of objects exist when I check same parameters with filter it retuns 0 objects
body: <p>I am trying to use <code>get_or_create</code> method to see if a record exists. If the record exists do nothing otherwise create it.</p>
  
  <p>This model is basically used on the command that is failing</p>
  
  <pre><code> class modelStudentExamsPerformed(models.Model):
          patient = models.ForeignKey(modelPatient)
          student = models.ForeignKey(modelStudent,on_delete=models.CASCADE)
          normalBodyPart = models.ForeignKey(modelNormalBodyPartResult,default=None,blank=True,null=True)
          abnormalBodyPart = models.ForeignKey(modelAbnormalBodyPartResult,default=None,blank=True,null=True)
          tool = models.CharField(max_length=128, default="")
  </code></pre>
  
  <p>Now this is the command that is using the above model and failing</p>
  
  <pre><code>exams.modelStudentExamsPerformed.objects.get_or_create()(patient=patient_qset, student=stud_qset,abnormalBodyPart=qset[0],normalBodyPart=None,date=None)
  </code></pre>
  
  <p>The above statement gives me the error :</p>
  
  <pre><code>get() returned more than one modelStudentExamsPerformed -- it returned 2!
  </code></pre>
  
  <p>Now this is where I am having trouble. When I look into the database through my admin I do notice two objects but those objects both have a value associated with <code>normalBodyPart</code> and their <code>abnormalBodyPart</code> is empty.Since I explicitly specified and assigned a value to <code>abnormalBodyPart</code> why does django say that two items already exist ? I hope this makes sense . </p>
  
  <p>Let e explain this another way as well suppose there are two statements 1 and 2.
  Statement 1 gets or creates a record based on a specified parameter . This get or create fails as django thinks there are already two records. However statement 2 uses the same exact parameters and returns 0 records. Why is that ? What am I missing and not understanding here ?</p>
  
  <p>Statement 1:</p>
  
  <pre><code>exams.modelStudentExamsPerformed.objects.get_or_create()(patient=patient_qset, student=stud_qset,abnormalBodyPart=qset[0],normalBodyPart=None,date=None)
  </code></pre>
  
  <p>when clearly none of the objects in this table have a value for <code>abnormalBodyPart</code>. I validated this by doing the following</p>
  
  <p>Statement 2:</p>
  
  <pre><code>k = exams.modelStudentExamsPerformed.objects.filter(patient=patient_qset, student=stud_qset,abnormalBodyPart=qset[0], normalBodyPart=None,date=None)
  </code></pre>
  
  <p>The above statment 2 does not return anything. My question is why does Statement 2 not return anything while statement 1 is complaining that there are 2 items already thus failing the <code>get</code> call.</p>