From 0b325289fde40c36bab71be8485a6cf3356fd2c2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 22 Apr 2022 12:01:33 +0200 Subject: Template: add "images" to DocumentItem get_values --- ishtar_common/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 5d034974d..6b4959496 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -246,6 +246,10 @@ class ValueGetter(object): values[prefix + "documents"] = [ doc.get_values(no_values=True) for doc in self.documents.all() ] + if not filtr or prefix + "images" in filtr: + values[prefix + "images"] = [ + image.get_values(no_values=True) for image in self.images.all() + ] if filtr and prefix + "main_image" not in filtr: return values if ( -- cgit v1.2.3