try to fix issue w/ news elastic update

This commit is contained in:
Kuroshini 2019-12-25 18:50:59 +03:00
parent f3c48281d4
commit ac2dc2344e

View File

@ -283,7 +283,7 @@ class News(GalleryMixin, BaseAttributes, TranslatedFieldsMixin, HasTagsMixin,
@property
def has_any_desc_active(self):
"""Detects whether news item has any active description"""
return any(list(map(lambda v: v.lower() == 'true', self.locale_to_description_is_active.values())))
return any(list(map(lambda v: v.lower() == 'true' if isinstance(v, str) else v, self.locale_to_description_is_active.values())))
@property
def is_publish(self):