diff options
Diffstat (limited to 'ishtar_common/models_common.py')
-rw-r--r-- | ishtar_common/models_common.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index 28026536a..17ba88419 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2328,6 +2328,13 @@ class DocumentItem: image__isnull=False).exclude( image="").exclude(pk=self.main_image.pk).order_by("pk") + @property + def pdf_attached(self): + for document in self.documents.filter( + Q(associated_file__isnull=False) | + Q(source__associated_file__isnull=False)).all(): + return document.pdf_attached + def get_extra_actions(self, request): """ For sheet template: return "Add document / image" action |