summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-13 11:45:21 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-13 11:45:21 +0100
commit0fc6f4384cfd9f27f14fc037c285e9991ee22d0d (patch)
treecbb91b9f0849d7125bd4e4c5714dda9ce0f50165 /ishtar_common
parent329b9e86bb67b4504a044931a07896ae6504c6ae (diff)
downloadIshtar-0fc6f4384cfd9f27f14fc037c285e9991ee22d0d.tar.bz2
Ishtar-0fc6f4384cfd9f27f14fc037c285e9991ee22d0d.zip
Syndication: sheet - fix display detail of a dict (display associated label)
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/templatetags/window_field.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ishtar_common/templatetags/window_field.py b/ishtar_common/templatetags/window_field.py
index fcd7d740e..8a9b5fa65 100644
--- a/ishtar_common/templatetags/window_field.py
+++ b/ishtar_common/templatetags/window_field.py
@@ -159,6 +159,11 @@ def field_flex_multiple_full(caption, data, small=False):
@register.inclusion_tag('ishtar/blocks/window_field_detail.html',
takes_context=True)
def field_detail(context, caption, item, li=False, size=None):
+ if isinstance(item, dict):
+ for k in ("cached_label", "label", "common_name"):
+ if k in item:
+ item = item[k]
+ break
return {'caption': caption, 'item': item,
'link': link_to_window(item, context),
'li': li, 'size': size}