Bugzilla – Attachment 97589 Details for
Bug 24457
K::A::Basket->to_api is not passing the parameters to the parent class implementation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24457: Make overloaded ->to_api pass the params to parent method
Bug-24457-Make-overloaded--toapi-pass-the-params-t.patch (text/plain), 1.26 KB, created by
David Nind
on 2020-01-19 21:13:40 UTC
(
hide
)
Description:
Bug 24457: Make overloaded ->to_api pass the params to parent method
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-01-19 21:13:40 UTC
Size:
1.26 KB
patch
obsolete
>From a5dabce0656bd9d54e0ad2c4942dfb863bc82fa9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >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 <tomascohen@theke.io> > >Signed-off-by: David Nind <david@davidnind.com> >--- > 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.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24457
:
97586
|
97587
|
97588
|
97589
|
97672
|
97673