From 2cf4bca31db124accb8c6a250237672a34834d32 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sun, 19 Jan 2020 02:06:00 -0300 Subject: [PATCH] Bug 24457: Make overloaded ->to_api pass the params to parent method This patch makes the overloaded to_api method for baskets care about the remaining parameters, and pass them to SUPER::to_api. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/Koha/Acquisition/Basket.t => FAIL: Tests fail! No embedded bookseller! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi --- Koha/Acquisition/Basket.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Acquisition/Basket.pm b/Koha/Acquisition/Basket.pm index cdb885b04f..7a927478b7 100644 --- a/Koha/Acquisition/Basket.pm +++ b/Koha/Acquisition/Basket.pm @@ -81,9 +81,9 @@ suitable for API output. =cut sub to_api { - my ( $self ) = @_; + my ( $self, $params ) = @_; - my $json = $self->SUPER::to_api; + my $json = $self->SUPER::to_api( $params ); $json->{closed} = ( $self->closedate ) ? Mojo::JSON->true -- 2.25.0