From 07f24f648504004adbb57b16bd18fbd23a3c3998 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 7 Jun 2018 11:09:35 +0200 Subject: Fix tests and fixtures for new document management (refs #4107) --- ishtar_common/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index d13def4c7..758596279 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1212,6 +1212,8 @@ class FixAssociated(object): class DocumentItem(object): @property def images(self): + if not hasattr(self, 'documents'): + return Document.objects.none() return self.documents.filter(image__isnull=False).exclude(image="") -- cgit v1.2.3