From 323e0935beb7f08487df163dbde4641d2455ebe7 Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Mon, 11 Jan 2021 10:36:31 +0100 Subject: [PATCH] VC/Zoom: Fail gracefully if co-host has no zoom account --- .../indico_vc_zoom/translations/messages.pot | 18 +++++++++++------- vc_zoom/indico_vc_zoom/util.py | 5 ++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/vc_zoom/indico_vc_zoom/translations/messages.pot b/vc_zoom/indico_vc_zoom/translations/messages.pot index 2eff619..13bb658 100644 --- a/vc_zoom/indico_vc_zoom/translations/messages.pot +++ b/vc_zoom/indico_vc_zoom/translations/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-01-05 13:20+0100\n" +"POT-Creation-Date: 2021-01-11 10:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -270,32 +270,36 @@ msgid "" "session block which were not automatically updated." msgstr "" -#: indico_vc_zoom/util.py:42 +#: indico_vc_zoom/util.py:45 msgid "All emails" msgstr "" -#: indico_vc_zoom/util.py:43 +#: indico_vc_zoom/util.py:46 msgid "Email domains" msgstr "" -#: indico_vc_zoom/util.py:44 +#: indico_vc_zoom/util.py:47 msgid "Authenticators" msgstr "" -#: indico_vc_zoom/util.py:124 +#: indico_vc_zoom/util.py:127 msgid "This room has been deleted from Zoom" msgstr "" -#: indico_vc_zoom/util.py:128 +#: indico_vc_zoom/util.py:131 msgid "" "Problem fetching room from Zoom. Please contact support if the error " "persists." msgstr "" -#: indico_vc_zoom/util.py:147 +#: indico_vc_zoom/util.py:150 msgid "Can't update meeting. Please contact support if the error persists." msgstr "" +#: indico_vc_zoom/util.py:206 +msgid "Could not find Zoom user for alternative host" +msgstr "" + #: indico_vc_zoom/templates/buttons.html:9 msgid "You will become an alternative host of this Zoom meeting" msgstr "" diff --git a/vc_zoom/indico_vc_zoom/util.py b/vc_zoom/indico_vc_zoom/util.py index 7f9eb5c..40b923a 100644 --- a/vc_zoom/indico_vc_zoom/util.py +++ b/vc_zoom/indico_vc_zoom/util.py @@ -201,4 +201,7 @@ def process_alternative_hosts(emails): def get_alt_host_emails(identifiers): """Convert a list of identities into a list of enterprise e-mails.""" - return [find_enterprise_email(principal_from_identifier(ident)) for ident in identifiers] + emails = [find_enterprise_email(principal_from_identifier(ident)) for ident in identifiers] + if None in emails: + raise VCRoomError(_('Could not find Zoom user for alternative host')) + return emails