Bugzilla – Attachment 186881 Details for
Bug 37622
"location" header is set for non-POST routes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37622: Fix add_debit
Bug-37622-Fix-adddebit.patch (text/plain), 1.08 KB, created by
Martin Renvoize (ashimema)
on 2025-09-24 13:33:32 UTC
(
hide
)
Description:
Bug 37622: Fix add_debit
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-09-24 13:33:32 UTC
Size:
1.08 KB
patch
obsolete
>From ca63a9ce01885bf38bb9fc57d339e5c3f387efe4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 15 Sep 2025 10:40:44 +0200 >Subject: [PATCH] Bug 37622: Fix add_debit > >We should not call discard_changes after accessing ->id but before > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > Koha/REST/V1/Patrons/Account.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/REST/V1/Patrons/Account.pm b/Koha/REST/V1/Patrons/Account.pm >index f0f6ac17eb4..71bc9f3c7bc 100644 >--- a/Koha/REST/V1/Patrons/Account.pm >+++ b/Koha/REST/V1/Patrons/Account.pm >@@ -220,9 +220,9 @@ sub add_debit { > > my $debit = $patron->account->add_debit($data); > $debit = Koha::Account::Debit->_new_from_dbic( $debit->{_result} ); >+ $debit->discard_changes; > > $c->res->headers->location( $c->req->url->to_string . '/' . $debit->id ); >- $debit->discard_changes; > > return $c->render( > status => 201, >-- >2.51.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 37622
:
170248
|
176567
|
180743
|
186395
|
186396
|
186397
|
186398
|
186879
|
186880
| 186881 |
186882