From 250a8580ae461cac5428c1e067d9b8f135550f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Thu, 9 Sep 2021 10:08:10 +0300 Subject: [PATCH] Fix tests --- hc/api/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hc/api/models.py b/hc/api/models.py index b27f352d..98aca553 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -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()