Bugzilla – Attachment 153045 Details for
Bug 32801
/checkouts?checked_in=1 errors when itemnumber is null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32801: Prevent 500 on /checkouts
Bug-32801-Prevent-500-on-checkouts.patch (text/plain), 1.26 KB, created by
Jonathan Druart
on 2023-07-05 10:28:21 UTC
(
hide
)
Description:
Bug 32801: Prevent 500 on /checkouts
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-07-05 10:28:21 UTC
Size:
1.26 KB
patch
obsolete
>From 0df10e077352c70c41a648d6508cbf7fad25f400 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 5 Jul 2023 12:26:09 +0200 >Subject: [PATCH] Bug 32801: Prevent 500 on /checkouts > >If checked_in flag is passed we return the "old checkouts". But if the >item has been deleted we explode with > "message":"Expected integer - got null.","path":"\/0\/item_id" > >The specs should reflect that an item can have been deleted. > >Test plan: >Hit the endpoint and confirm the above. >Can be done easily using curl: > curl -u koha:koha --request GET 'http://localhost:8081/api/v1/checkouts?patron_id=5&checked_in=1' --header "Content-Type: application/json" | jq >--- > api/v1/swagger/definitions/checkout.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/api/v1/swagger/definitions/checkout.yaml b/api/v1/swagger/definitions/checkout.yaml >index e2a4d733cac..4a9847623c2 100644 >--- a/api/v1/swagger/definitions/checkout.yaml >+++ b/api/v1/swagger/definitions/checkout.yaml >@@ -8,7 +8,9 @@ properties: > type: integer > description: Internal patron identifier > item_id: >- type: integer >+ type: >+ - integer >+ - "null" > description: internal identifier of checked out item > due_date: > type: string >-- >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 32801
:
153044
|
153045
|
153106
|
153107
|
153340