Bugzilla – Attachment 117156 Details for
Bug 27593
Inconsistent return status on club holds routes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27593: Consistent behavior for club holds route
Bug-27593-Consistent-behavior-for-club-holds-route.patch (text/plain), 1.65 KB, created by
Martin Renvoize (ashimema)
on 2021-02-22 15:53:11 UTC
(
hide
)
Description:
Bug 27593: Consistent behavior for club holds route
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-02-22 15:53:11 UTC
Size:
1.65 KB
patch
obsolete
>From 164da3adc1bf3e3e5bce6a4957e958dac6eab70d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 2 Feb 2021 11:22:50 -0300 >Subject: [PATCH] Bug 27593: Consistent behavior for club holds route > >This patch: >- Fixes a malformed response when biblio_id is invalid >- Fixes the return status (400 => 404) when biblio_id is invalid >- Adapts the error strings to be consistent with the Cities.pm file > >To test: >1. Apply the regression tests patch >2. Run: > $ kshell > k$ prove t/db_dependent/api/v1/clubs_holds.t >=> FAIL: Tests fail >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> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/REST/V1/Clubs/Holds.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/REST/V1/Clubs/Holds.pm b/Koha/REST/V1/Clubs/Holds.pm >index 21c95c1d15..726f6f20de 100644 >--- a/Koha/REST/V1/Clubs/Holds.pm >+++ b/Koha/REST/V1/Clubs/Holds.pm >@@ -81,7 +81,7 @@ sub add { > unless ($item) { > return $c->render( > status => 404, >- openapi => { error => "item_id not found." } >+ openapi => { error => "Item not found" } > ); > } > else { >@@ -100,8 +100,8 @@ sub add { > > unless ($biblio) { > return $c->render( >- status => 400, >- openapi => "Biblio not found." >+ status => 404, >+ openapi => { error => "Biblio not found" } > ); > } > >-- >2.20.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 27593
:
116216
|
116217
|
117007
|
117008
|
117155
| 117156