summaryrefslogtreecommitdiff
path: root/ishtar_common/views_item.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-11-25 17:30:52 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-19 14:45:55 +0100
commitd4d41fdc11cce0ecd7f7c8696185fcb983702297 (patch)
tree3bbe0da3df826286b3a24ebdf6a389fa8708b22c /ishtar_common/views_item.py
parent1a8fa1261f38cca3030ced00157e52349fd3e815 (diff)
downloadIshtar-d4d41fdc11cce0ecd7f7c8696185fcb983702297.tar.bz2
Ishtar-d4d41fdc11cce0ecd7f7c8696185fcb983702297.zip
🐛 tables: force "/" at the end of show item url
Diffstat (limited to 'ishtar_common/views_item.py')
-rw-r--r--ishtar_common/views_item.py14
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)