fix tags indexing #2

This commit is contained in:
Kuroshini 2019-12-20 21:59:49 +03:00
parent 1771b02afd
commit 35673f9ad0

View File

@ -159,7 +159,7 @@ class TagCategory(models.Model):
@property
def label_indexing(self):
base_dict = self.translation.text if self.translation and isinstance(self.translation.text, dict) else {}
dict_to_index = {locale: base_dict.get(locale) for locale in OBJECT_FIELD_PROPERTIES}
dict_to_index = {locale: base_dict.get(locale) for locale in OBJECT_FIELD_PROPERTIES.keys()}
return AttrDict(dict_to_index)
objects = TagCategoryQuerySet.as_manager()