Fixed ownNo number dupe check!
This commit is contained in:
parent
284a02a557
commit
c97cda3c49
|
@ -101,9 +101,9 @@ class QSOForm(forms.ModelForm):
|
|||
raise forms.ValidationError("Number has to be in range of [1, 1000000]")
|
||||
|
||||
try:
|
||||
QSO.objects.get(owner=self.user, ownNo=data)
|
||||
QSO.objects.get(owner=self.user.id, ownNo=data)
|
||||
raise forms.ValidationError("You already logged a QSO with the number %s" % data)
|
||||
except:
|
||||
except QSO.DoesNotExist:
|
||||
return data
|
||||
|
||||
def clean_otherNo(self):
|
||||
|
|
|
@ -168,7 +168,6 @@ class QSO(models.Model):
|
|||
if checkQSO:
|
||||
self.checkQSOData()
|
||||
|
||||
print(" ==> ", self, " ==> ", self.cfmdQSO)
|
||||
super(QSO, self).save(*args, **kwargs)
|
||||
|
||||
def __str__(self):
|
||||
|
|
Loading…
Reference in New Issue