mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
VC/Zoom: Refresh data before editing
This commit is contained in:
parent
438ddd4c96
commit
d7719612e3
@ -15,6 +15,7 @@
|
||||
|
||||
- Fix deleting Zoom meetings that were already deleted on the Zoom side when running outside a web request context (e.g. during scheduled deletion of events)
|
||||
- Fix overwriting co-hosts added via the Zoom client when using "make me co-host" in Indico
|
||||
- Always refresh data from Zoom before editing via Indico to avoid saving with stale data
|
||||
|
||||
### 2.3b2
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from flask import flash, has_request_context, session
|
||||
from flask import flash, has_request_context, request, session
|
||||
from markupsafe import escape
|
||||
from requests.exceptions import HTTPError
|
||||
from sqlalchemy.orm.attributes import flag_modified
|
||||
@ -168,6 +168,17 @@ class ZoomPlugin(VCPluginMixin, IndicoPlugin):
|
||||
|
||||
def create_form(self, event, existing_vc_room=None, existing_event_vc_room=None):
|
||||
"""Override the default room form creation mechanism."""
|
||||
|
||||
if existing_vc_room and request.method != 'POST':
|
||||
try:
|
||||
self.refresh_room(existing_vc_room, event)
|
||||
except VCRoomNotFoundError as exc:
|
||||
raise UserValueError(unicode(exc))
|
||||
except VCRoomError:
|
||||
# maybe a temporary issue - we just keep going and fail when saving in
|
||||
# case it's something more persistent
|
||||
pass
|
||||
|
||||
form = super(ZoomPlugin, self).create_form(
|
||||
event,
|
||||
existing_vc_room=existing_vc_room,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user