Bugzilla – Attachment 156060 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.34 KB, created by
Jonathan Druart
on 2023-09-22 09:54:15 UTC
(
hide
)
Description:
Bug 32496: Some fixes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-09-22 09:54:15 UTC
Size:
2.34 KB
patch
obsolete
>From 2aa40c5fd5d076d3b5429f4077968268bc62db76 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 > >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> >--- > 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 e94d027e49f..a7749f1210e 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 e222f33736b..2e108c770d0 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.25.1
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