Browse Source

Fix tests

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

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

@ -116,7 +116,7 @@ class Check(models.Model):
return str(self.code)
def relative_url(self):
if self.project.show_slugs:
if self.project_id and self.project.show_slugs:
if not self.slug:
return None
@ -267,7 +267,7 @@ class Check(models.Model):
update_rel_url = reverse("hc-api-single", args=[self.code])
pause_rel_url = reverse("hc-api-pause", args=[self.code])
result["ping_url"] = self.url()
result["ping_url"] = settings.PING_ENDPOINT + str(self.code)
result["update_url"] = settings.SITE_ROOT + update_rel_url
result["pause_url"] = settings.SITE_ROOT + pause_rel_url
result["channels"] = self.channels_str()


Loading…
Cancel
Save