[Koha-bugs] [Bug 32801] /checkouts?checked_in=1 errors when itemnumber is null

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 5 12:28:21 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32801

--- Comment #2 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 153045
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153045&action=edit
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

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list