From a8c7edb3afd96ca0c4d4dc6d64f3c9dfae795248 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 --- 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 6fe6bd9a76..dd35aca35c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt @@ -47,6 +47,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.30.2