From ba2cf9301130e39277b45b6b6195471223997984 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 23 Jan 2019 16:03:00 +0100 Subject: Document sheet fix --- ishtar_common/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ishtar_common') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 769013fa2..735ad27a0 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1443,7 +1443,7 @@ class DocumentItem(object): @property def images_without_main_image(self): - if not hasattr(self, 'main_image'): + if not hasattr(self, 'main_image') or not hasattr(self, 'documents'): return self.images if not self.main_image: return self.documents.filter( -- cgit v1.2.3