Make hooks unique

This commit is contained in:
Mark Veidemanis 2022-10-15 23:00:02 +01:00
parent 8c906815d0
commit 67efd01c15
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 2 deletions

View File

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