From: Guillaume Pellerin Date: Fri, 21 Jul 2023 08:58:37 +0000 (+0200) Subject: fix conference stop X-Git-Tag: 2.9.0~61 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=9efa22295f4729ca1c4daf0ebccc6ce235ec19e4;p=teleforma.git fix conference stop --- 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):