From 817f7a1cce694a7ee1a4258c02c60cc6f989e851 Mon Sep 17 00:00:00 2001 From: Arthur Suzuki Date: Tue, 30 Sep 2025 19:13:20 +0000 Subject: [PATCH] Bug 40920: fix invalid patron_id parameter Test plan: - on KTD, without patch, create an issue for user "koha" (patron_id 51) - go to http://localhost:8081/api/v1/checkouts?patron_id=51 - you should get an error (and no issues) - in /var/log/koha/plack-api-error.log you will see "Unknown column 'patron_id'". - apply patch and "restart_all" - make the same request to the api - you should see the issue for user koha. --- Koha/REST/V1/Checkouts.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/REST/V1/Checkouts.pm b/Koha/REST/V1/Checkouts.pm index 3d8702372a..3d0094567a 100644 --- a/Koha/REST/V1/Checkouts.pm +++ b/Koha/REST/V1/Checkouts.pm @@ -50,6 +50,9 @@ sub list { my $checked_in = $c->param('checked_in'); $c->req->params->remove('checked_in'); + $c->req->params->append(borrowernumber => $c->param('patron_id')); + $c->req->params->remove('patron_id'); + try { my $checkouts_set; -- 2.39.5