From ac2dc2344efb89b40d6c751a8d4de405b6bc3c8d Mon Sep 17 00:00:00 2001 From: Kuroshini Date: Wed, 25 Dec 2019 18:50:59 +0300 Subject: [PATCH] try to fix issue w/ news elastic update --- apps/news/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/news/models.py b/apps/news/models.py index c7785f45..79e2bbd0 100644 --- a/apps/news/models.py +++ b/apps/news/models.py @@ -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):