]> git.parisson.com Git - teleforma.git/commitdiff
fix conference stop
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 21 Jul 2023 08:58:37 +0000 (10:58 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 21 Jul 2023 08:58:37 +0000 (10:58 +0200)
teleforma/views/core.py

index bd04f354a6fb256a7ee89f94fd879b6608c544c4..9f4fa808db4c3182faaf3234038872ed1f0a7c65 100644 (file)
@@ -831,22 +831,22 @@ class ConferenceView(CourseAccessMixin, DetailView):
 
     @jsonrpc_method('teleforma.stop_conference')
     def stop(request, public_id):
-        conference = Conference.objects.get(public_id=public_id)
-        conference.date_end = datetime.datetime.now()
-        conference.save()
-        for stream in conference.livestream.all():
-            stream.delete()
-        for station in conference.station.all():
-            station.started = False
-            station.save()
-            station.stop()
-        if 'telecaster' in settings.INSTALLED_APPS:
-            try:
-                url = 'http://' + conference.department.domain + '/json/'
-                s = ServiceProxy(url)
-                s.teleforma.stop_conference(conference.public_id)
-            except:
-                pass
+            conference = Conference.objects.get(public_id=public_id)
+            conference.date_end = datetime.datetime.now()
+            conference.save()
+            for stream in conference.livestream.all():
+                stream.delete()
+            if 'telecaster' in settings.INSTALLED_APPS:
+                for station in conference.station.all():
+                    station.started = False
+                    station.save()
+                    station.stop()
+                    try:
+                        url = 'https://' + conference.department.domain + '/json/'
+                        s = ServiceProxy(url)
+                        s.teleforma.stop_conference(conference.public_id)
+                    except:
+                        pass
 
     @jsonrpc_method('teleforma.create_conference')
     def create(request, conf_dict):