summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-02 16:18:47 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-16 17:04:41 +0100
commit340c526e4a24598ec0bde0cf55a41f5a94d9e8c7 (patch)
tree23d7e574a6e02c47a3eeb748fad3203fc6448f1e
parent46ee7a1ad70b77a7548914ea2d85dab15db8edcd (diff)
downloadIshtar-340c526e4a24598ec0bde0cf55a41f5a94d9e8c7.tar.bz2
Ishtar-340c526e4a24598ec0bde0cf55a41f5a94d9e8c7.zip
Search: fix url for person and organization (refs #5201)
-rw-r--r--CHANGES-DEV.md1
-rw-r--r--ishtar_common/views_item.py3
2 files changed, 3 insertions, 1 deletions
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")
+ "://"