]> git.parisson.com Git - teleforma.git/commitdiff
fix notify property
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 19 Jan 2023 16:31:50 +0000 (17:31 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 19 Jan 2023 16:31:50 +0000 (17:31 +0100)
teleforma/models/core.py

index 4fcb9e40c8b63769bca7238f77f2e5a93b608d82..8150baf016026f8611874e414a010ce58f87e3db 100755 (executable)
@@ -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):