diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/models.py | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 73366e35a..8fb6df3ac 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1445,6 +1445,10 @@ class DocumentItem(object):      def images_without_main_image(self):          if not hasattr(self, 'main_image'):              return self.images +        if not self.main_image: +            return self.documents.filter( +                image__isnull=False).exclude( +                image="").order_by("pk")          return self.documents.filter(              image__isnull=False).exclude(              image="").exclude(pk=self.main_image.pk).order_by("pk") | 
