mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-05-21 02:41:54 +00:00
Hotfix for #154
This commit is contained in:
parent
0abc531f45
commit
26b904ef7e
1 changed files with 6 additions and 0 deletions
|
|
@ -108,6 +108,12 @@ class TranslationField(object):
|
|||
# (will show up e.g. in the admin).
|
||||
self.verbose_name = build_localized_verbose_name(translated_field.verbose_name, language)
|
||||
|
||||
def __hash__(self):
|
||||
# TODO this hotfix should be reconsidered.
|
||||
# The case is connected with duplicated self.creation_counter amoung translated fields
|
||||
h = super(TranslationField, self).__hash__()
|
||||
return h + hash(self.language)
|
||||
|
||||
def get_attname_column(self):
|
||||
attname = self.get_attname()
|
||||
column = build_localized_fieldname(
|
||||
|
|
|
|||
Loading…
Reference in a new issue