Fixed ownNo number dupe check!

This commit is contained in:
Sebastian Lohff 2017-01-26 23:47:18 +01:00
parent 284a02a557
commit c97cda3c49
2 changed files with 2 additions and 3 deletions

View File

@ -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):

View File

@ -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):