Browse Source

Fix code formatting in the Notification model

pull/456/head
Pēteris Caune 4 years ago
parent
commit
816c158744
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      hc/api/models.py

+ 3
- 3
hc/api/models.py View File

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


Loading…
Cancel
Save