diff --git a/main/models.py b/main/models.py index b1b1e09..7c84eb9 100644 --- a/main/models.py +++ b/main/models.py @@ -21,7 +21,7 @@ class Contact(models.Model): priority=models.IntegerField() def save(self,*args,**kwargs): - a=Updates.objects.get(page='contact') + a,_=Updates.objects.get_or_create(page='contact') a.date=date.today() a.save() super().save(*args,**kwargs)