From 816c158744d7b49d6c65bd9153acedc97c418899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 6 Nov 2020 18:50:23 +0200 Subject: [PATCH] Fix code formatting in the Notification model --- hc/api/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hc/api/models.py b/hc/api/models.py index bc2cda39..1612a80d 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -765,9 +765,6 @@ class Channel(models.Model): class Notification(models.Model): - class Meta: - get_latest_by = "created" - code = models.UUIDField(default=uuid.uuid4, null=True, editable=False) owner = models.ForeignKey(Check, models.CASCADE, null=True) check_status = models.CharField(max_length=6) @@ -775,6 +772,9 @@ class Notification(models.Model): created = models.DateTimeField(auto_now_add=True) error = models.CharField(max_length=200, blank=True) + class Meta: + get_latest_by = "created" + def status_url(self): path = reverse("hc-api-notification-status", args=[self.code]) return settings.SITE_ROOT + path