From 9f68358fe3e5b024499e11beb7ebf18fe255cb81 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 17 Jul 2024 08:39:57 +0000 Subject: [PATCH] Bug 34147: Prevent crashing of patron search This is just working around the problem, I think. It fixes the crashing issue but the limited patron's category is no longer listed on the table. I dont fully understand the 'library limitation' functionality, what is the expected functionality here when following the test plan? Is 'Acosta, Edna' expected to not show up? Since its PT category? --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index a0d53600e3..14326acb9c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -550,7 +550,7 @@ "searchable": true, "orderable": true, "render": function( data, type, row, meta ) { - return escape_str(categories_map[data.toLowerCase()].description); + return escape_str(categories_map[data.toLowerCase()]?.description); } } [% CASE 'dateexpiry' %] -- 2.39.2