]> git.koha-community.org Git - koha.git/commit
Bug 33885: Make Koha::Acq::Order->creator return undef if no creator
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 7 Jun 2023 09:05:18 +0000 (11:05 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 26 Jun 2023 12:41:10 +0000 (14:41 +0200)
commitfdc345dd9cbc58af4df15a9796fc53f3f295cdec
tree81386bdf4d3868f6345c49785261997c4d371e35
parent67dfa18089edd55b9abc9fd223841be54cc6081c
Bug 33885: Make Koha::Acq::Order->creator return undef if no creator

If the account of the creator of an order has been deleted we should
return undef here, instead of crashing with
GET /api/v1/acquisitions/orders: unhandled exception (Mojo::Exception)<<DBIC result _type  isn't of the _type Borrower at /kohadevbox/koha/Koha/Objects.pm line 445.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c3a35418ea3defb50debbab4fd334bee4eb5229)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Acquisition/Order.pm
t/db_dependent/Koha/Acquisition/Order.t