Bugzilla – Attachment 186397 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.01 KB, created by
Jonathan Druart
on 2025-09-15 08:42:42 UTC
(
hide
)
Description:
Bug 37622: Fix add_debit
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-09-15 08:42:42 UTC
Size:
1.01 KB
patch
obsolete
>From 9e7fe7545f9ddc76b1396237d7e50399d4b5988a 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> >--- > 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 fcfe29d0ff4..347c58251f2 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.34.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 37622
:
170248
|
176567
|
180743
|
186395
|
186396
|
186397
|
186398
|
186879
|
186880
|
186881
|
186882