From 67efd01c153a54656fe6855f6b5aeb4541b6a9b5 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 15 Oct 2022 23:00:02 +0100 Subject: [PATCH] Make hooks unique --- core/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/models.py b/core/models.py index 4670954..6b1e15f 100644 --- a/core/models.py +++ b/core/models.py @@ -76,8 +76,8 @@ class Session(models.Model): class Hook(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) - name = models.CharField(max_length=1024, null=True, blank=True) - hook = models.CharField(max_length=255) + name = models.CharField(max_length=1024, null=True, blank=True, unique=True) + hook = models.CharField(max_length=255, unique=True) received = models.IntegerField(default=0)