mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-13 14:44:47 +00:00
fix: i18n error
This commit is contained in:
parent
aa52060f24
commit
100dad75f1
@ -42,7 +42,7 @@ class ComponentI18nApi(RetrieveAPIView):
|
||||
|
||||
if not lang:
|
||||
return Response(data)
|
||||
if lang not in Language.choices:
|
||||
if lang not in dict(Language.choices).keys():
|
||||
lang = 'en'
|
||||
code = Language.to_internal_code(lang, with_filename=True)
|
||||
data = data.get(code) or {}
|
||||
|
Loading…
Reference in New Issue
Block a user