mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-04-12 09:20:58 +00:00
Get language getting from the field attribute rather than name.
The method seems to be not used anymore, but fix it nevertheless.
This commit is contained in:
parent
af672f3160
commit
369293b14d
1 changed files with 1 additions and 2 deletions
|
|
@ -219,8 +219,7 @@ class TranslationBaseModelAdmin(BaseModelAdmin):
|
|||
exclude = []
|
||||
for orig_fieldname, translation_fields in self.trans_opts.fields.items():
|
||||
for tfield in translation_fields:
|
||||
language = tfield.name.split('_')[-1]
|
||||
if language in excl_languages and tfield not in exclude:
|
||||
if tfield.language in excl_languages and tfield not in exclude:
|
||||
exclude.append(tfield)
|
||||
return tuple(exclude)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue