From bee2b3d33ed6030b5a63d22148b9955a9897e51d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 18 Sep 2023 11:41:36 +0200 Subject: [PATCH] Bug 33949: Fix display of old checkouts if no checkouts exist If we pass an empty array from the perl controller, we retrieve an empty string from the template, and the merge does not work. This patch fixes the following bug: Pick a patron without checkout history Check them an item out and check it in => The table is empty, whereas it should display the item that has been checked in. Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt index d877c9422d..63d678209f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt @@ -42,6 +42,8 @@

Checkout history

+ [% UNLESS checkouts %][% checkouts = [] %][% END %] + [% UNLESS old_checkouts %][% old_checkouts = [] %][% END %] [% SET all_checkouts = checkouts.merge(old_checkouts) %] [% IF all_checkouts.size == 0 %] You have never borrowed anything from this library. -- 2.39.5