From 17e19fe311d470e73d2cca332ffcce4dc5663a47 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 22 Jun 2023 08:58:34 +0000 Subject: [PATCH] Bug 34083: (follow-up) Prevent showing 'null' In patron lists, if the patron added is an organization without the firstname, it presents 'null'. This fixes that Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt index dc3c6b6376..00a33b8c2a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt @@ -256,7 +256,7 @@ patron_autocomplete($("#find_patron"), { 'on-select-callback': function( event, ui ) { var field = ui.item.cardnumber; - AddPatron( ui.item.firstname + " " + ( ui.item.middle_name || "" ) + " " + ui.item.surname, field, $("#patrons_to_add"), 'patrons_to_add' ); + AddPatron( ( ui.item.firstname || "" ) + " " + ( ui.item.middle_name || "" ) + " " + ( ui.item.surname || "" ), field, $("#patrons_to_add"), 'patrons_to_add' ); $("#find_patron").val('').focus(); return false; } -- 2.39.5