From 340c526e4a24598ec0bde0cf55a41f5a94d9e8c7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 2 Nov 2021 16:18:47 +0100 Subject: Search: fix url for person and organization (refs #5201) --- CHANGES-DEV.md | 1 + ishtar_common/views_item.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES-DEV.md b/CHANGES-DEV.md index 7465816e8..5159f6ff0 100644 --- a/CHANGES-DEV.md +++ b/CHANGES-DEV.md @@ -5,3 +5,4 @@ Ishtar changelog - Context record: bulk update ### Bugs ### +- Search: fix url for person and organization diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index 796a3eb47..11d61b67a 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -491,7 +491,8 @@ def _get_values(request, val): if callable(v): v = v() try: - if hasattr(v, "url") and v.url: + if not isinstance(v, (models.Person, models.Organization)) and\ + hasattr(v, "url") and v.url: v = ( (request.is_secure() and "https" or "http") + "://" -- cgit v1.2.3