]> git.koha-community.org Git - koha.git/commit
Bug 32801: Prevent 500 on /checkouts
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 5 Jul 2023 10:26:09 +0000 (12:26 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 12 Jul 2023 17:30:51 +0000 (14:30 -0300)
commitc4cb183ae1f7225c86a38178176c966ad9cebeda
tree03ff574bd52b2c463c5d91d1b49ba42c0634097d
parentb157a2cd7fd57169850ac12e9cb18c4edf771ef7
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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
api/v1/swagger/definitions/checkout.yaml