From fc66ccfca7c84fa7242837c8487a4b742b50bd78 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 31 May 2019 13:27:29 +0200 Subject: Fix gallery image for documents --- ishtar_common/views_item.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index f14b146fa..53c65c3aa 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -1860,8 +1860,11 @@ def get_item(model, func_name, default_name, extra_request_keys=None, tab_cols.append(tc) k = "__".join(tab_cols) if k.endswith("__image") or k.endswith("__thumbnail"): - if not value.startswith(settings.MEDIA_ROOT): + if not value.startswith(settings.MEDIA_ROOT) and not \ + value.startswith("http://") and not \ + value.startswith("https://"): value = settings.MEDIA_URL + value + if hasattr(model, 'COL_LINK') and k in model.COL_LINK: value = link_ext_template.format(value, value) if isinstance(value, datetime.date): -- cgit v1.2.3