From 1f6a4e4cc67e08cdfdbdf50b19ffe7c366a36b9a Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 26 Aug 2021 09:35:39 -0300 Subject: [PATCH] Bug 28906: Make Koha::Items->filter_by_visible_in_opac honour list context This patch makes the method honour list context. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => FAIL: Tests fail! It returns [Koha::Items]. Boo! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind --- Koha/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Items.pm b/Koha/Items.pm index 193e6e58d2..3e2430642e 100644 --- a/Koha/Items.pm +++ b/Koha/Items.pm @@ -91,7 +91,7 @@ sub filter_by_visible_in_opac { $result = $result->filter_out_lost; } - return $result; + return $result->search; } =head3 filter_out_lost -- 2.20.1