From 1c901d673c42ec94ed9cbd812d351ad847f242bc Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 19 Mar 2024 10:59:26 +0100 Subject: [PATCH] fix get_description in admin.view --- idhub/admin/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/idhub/admin/views.py b/idhub/admin/views.py index e8e4876..355d8ce 100644 --- a/idhub/admin/views.py +++ b/idhub/admin/views.py @@ -1021,7 +1021,10 @@ class SchemasImportAddView(SchemasMix): def get_description(self): for des in json.loads(self.get_template_description()).get('description', []): - if settings.LANGUAGE_CODE == des.get('lang'): + lang = settings.LANGUAGE_CODE + if lang == 'ca': + lang = 'ca_ES' + if lang == des.get('lang'): return des.get('value', '') return ''