From 3749c549e0abbb6f88737f668fa0f6753ffc54d4 Mon Sep 17 00:00:00 2001 From: lukas Date: Fri, 19 May 2023 12:58:40 +0200 Subject: [PATCH] fix: actions row --- src/unfold/templatetags/unfold_list.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/unfold/templatetags/unfold_list.py b/src/unfold/templatetags/unfold_list.py index 9deddd8f..4aa92ee5 100644 --- a/src/unfold/templatetags/unfold_list.py +++ b/src/unfold/templatetags/unfold_list.py @@ -235,16 +235,18 @@ def result_list(context: Dict[str, Any], cl: ChangeList) -> Dict[str, Any]: """ headers = list(result_headers(cl)) num_sorted_fields = 0 + for h in headers: if h["sortable"] and h["sorted"]: num_sorted_fields += 1 + return { "cl": cl, "result_hidden_fields": list(result_hidden_fields(cl)), "result_headers": headers, "num_sorted_fields": num_sorted_fields, "results": list(results(cl)), - "actions_row": context["actions_row"], + "actions_row": context.get("actions_row"), }