Update pre-commit versions

This commit is contained in:
2023-02-09 07:20:35 +00:00
parent 66232c8260
commit 3f666e8251
7 changed files with 124 additions and 45 deletions

View File

@@ -42,6 +42,15 @@ SERVICE_CHOICES = (
("none", "Disabled"),
)
POLICY_CHOICES = (
("default", "Default: Trigger only when there were no results last time"),
(
"change",
"Change: Default + trigger when there are no results (if there were before)",
),
("always", "Always: Trigger on every run (not recommended for low intervals)"),
)
class Plan(models.Model):
name = models.CharField(max_length=255, unique=True)
@@ -193,6 +202,7 @@ class NotificationRule(models.Model):
match = models.JSONField(null=True, blank=True)
service = models.CharField(choices=SERVICE_CHOICES, max_length=255, default="ntfy")
send_empty = models.BooleanField(default=False)
policy = models.CharField(choices=POLICY_CHOICES, max_length=255, default="default")
def __str__(self):
return f"{self.user} - {self.name}"