From 9efa22295f4729ca1c4daf0ebccc6ce235ec19e4 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 21 Jul 2023 10:58:37 +0200 Subject: [PATCH] fix conference stop --- teleforma/views/core.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/teleforma/views/core.py b/teleforma/views/core.py index bd04f354..9f4fa808 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -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): -- 2.39.5