diff options
Diffstat (limited to 'ishtar_common/views_item.py')
-rw-r--r-- | ishtar_common/views_item.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index d4a975e37..8d41d1cc6 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -2881,9 +2881,10 @@ def get_item( if data_type.startswith("json"): rows = [] if data_type == "json-map": - lnk = link_template.format( - reverse("show-" + default_name, args=[999999, ""]), - ) + curl = reverse("show-" + default_name, args=[999999, ""]) + if not curl.endswith("/"): + curl += "/" + lnk = link_template.format(curl) lnk = lnk.replace("999999", "<pk>") if not has_locks: lnk = lnk.replace("<lock>", "") @@ -2895,10 +2896,11 @@ def get_item( } if not no_link: try: + curl = reverse("show-" + default_name, args=[data[0], ""]) + if not curl.endswith("/"): + curl += "/" lnk_template = link_template - lnk = lnk_template.format( - reverse("show-" + default_name, args=[data[0], ""]) - ) + lnk = lnk_template.format(curl) if has_locks and data[-2]: if data[-1] == current_user_id: lnk = lnk.replace("<lock>", own_lock) |