From b8df98fdce2f5d83dbbeda2cea24069d1aa84d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Thuret?= Date: Mon, 7 Feb 2022 10:45:31 +0100 Subject: [PATCH] set default language instead of raise error --- app/app.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/app.py b/app/app.py index 03f0b0f..8173e0d 100644 --- a/app/app.py +++ b/app/app.py @@ -133,13 +133,13 @@ def create_app(args): # Raise AttributeError to prevent app startup if user input is not valid. if frontend_argos_language_source is None: - raise AttributeError( - f"{args.frontend_language_source} as frontend source language is not supported." - ) + frontend_argos_language_source = languages[0] if frontend_argos_language_target is None: - raise AttributeError( - f"{args.frontend_language_target} as frontend target language is not supported." - ) + if languages[1]: + frontend_argos_language_target = languages[1] + else: + frontend_argos_language_target = languages[0] + api_keys_db = None