mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-08-21 22:00:15 +02:00
set default language instead of raise error
This commit is contained in:
parent
f75a294aa0
commit
b8df98fdce
12
app/app.py
12
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user