fix get_description in admin.view

This commit is contained in:
Cayo Puigdefabregas 2024-03-19 10:59:26 +01:00
parent fe5b547a25
commit 1c901d673c
1 changed files with 4 additions and 1 deletions

View File

@ -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 ''