Bugzilla – Attachment 156081 Details for
Bug 32496
Reduce unnecessary unblessings of objects in Circulation.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32496: Some fixes
Bug-32496-Some-fixes.patch (text/plain), 2.43 KB, created by
Marcel de Rooy
on 2023-09-22 12:34:38 UTC
(
hide
)
Description:
Bug 32496: Some fixes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-22 12:34:38 UTC
Size:
2.43 KB
patch
obsolete
>From 222e1735beb2c13f4b76622601b8dab5e2fb60d5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 4 Jul 2023 15:48:00 +0200 >Subject: [PATCH] Bug 32496: Some fixes >Content-Type: text/plain; charset=utf-8 > >This can be squashed > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/REST/V1/Checkouts.pm | 2 +- > t/db_dependent/Circulation/issue.t | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/Koha/REST/V1/Checkouts.pm b/Koha/REST/V1/Checkouts.pm >index e94d027e49..a7749f1210 100644 >--- a/Koha/REST/V1/Checkouts.pm >+++ b/Koha/REST/V1/Checkouts.pm >@@ -263,7 +263,7 @@ sub add { > } > > # Call 'AddIssue' >- my $checkout = AddIssue( $patron->unblessed, $item->barcode ); >+ my $checkout = AddIssue( $patron, $item->barcode ); > if ($checkout) { > $c->res->headers->location( > $c->req->url->to_string . '/' . $checkout->id ); >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index e222f33736..2e108c770d 100755 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -598,17 +598,17 @@ my $itemnumber4 = Koha::Item->new( > )->store->itemnumber; > > t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} ); >-AddIssue( $borrower_2, 'barcode_6', dt_from_string ); >+AddIssue( $patron_2, 'barcode_6', dt_from_string ); > $item = Koha::Items->find( $itemnumber4 ); > ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' ); > > t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' ); > AddReturn( 'barcode_6', $branchcode_1 ); >-my $test = AddIssue( $borrower_2, 'barcode_6', dt_from_string ); >+my $test = AddIssue( $patron_2, 'barcode_6', dt_from_string ); > $item = Koha::Items->find( $itemnumber4 ); > ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} ); > >-AddIssue( $borrower_2, 'barcode_6', dt_from_string ); >+AddIssue( $patron_2, 'barcode_6', dt_from_string ); > AddReturn( 'barcode_6', $branchcode_1 ); > $item = Koha::Items->find( $itemnumber4 ); > ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} ); >-- >2.30.2
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 32496
:
144722
|
144723
|
144789
|
144804
|
145024
|
145027
|
147158
|
147162
|
150614
|
153017
|
153018
|
153517
|
153518
|
153519
|
156059
|
156060
|
156061
|
156080
| 156081 |
156082
|
156099
|
156102
|
156103