From cf038dd938636303c3936ce186f1a64ae9cf10db 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 Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- 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.39.5