From: Guillaume Pellerin Date: Thu, 19 Jan 2023 16:31:50 +0000 (+0100) Subject: fix notify property X-Git-Tag: 2.8.0~11 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ad5e9946da52cfb53961ea1e8bf3ea56f34c735f;p=teleforma.git fix notify property --- diff --git a/teleforma/models/core.py b/teleforma/models/core.py index 4fcb9e40..8150baf0 100755 --- a/teleforma/models/core.py +++ b/teleforma/models/core.py @@ -465,14 +465,15 @@ class Conference(models.Model): async with httpx.AsyncClient(transport=transport) as client: response = client.post("http://localhost" + reverse('teleforma-live-conference-notify'), data={'id': self.id}, timeout=20.0) - # assert response.status_code == 200 - self.notified_live = True + await response.status_code == 200 def save(self, *args, **kwargs): if not self.public_id: self.public_id = get_random_hash() self.course.save() self.notify() + if self.notified_live: + self.notified_live = True super(Conference, self).save(*args, **kwargs) def to_dict(self):