From 9cfb92c20637ba9b94f751f036c001b28eb191e2 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 4 Nov 2024 13:08:06 +0000 Subject: [PATCH] Bug 38175: (follow-up) Quiet warnings in tests We weren't passing the required data into the FKConstraint exception, this patch passes biblio_id and value as required. --- Koha/Booking.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Koha/Booking.pm b/Koha/Booking.pm index 2450465649b..8e9c45ad711 100644 --- a/Koha/Booking.pm +++ b/Koha/Booking.pm @@ -115,8 +115,13 @@ sub store { $self->biblio_id( $self->item->biblionumber ) unless $self->biblio_id; - Koha::Exceptions::Object::FKConstraint->throw() - unless ( $self->biblio_id == $self->item->biblionumber ); + Koha::Exceptions::Object::FKConstraint->throw( + broken_fk => 'item/biblio_id', + value => "item biblionumber: " + . $self->item->biblionumber + . " booking biblio_id: " + . $self->biblio_id + ) unless ( $self->biblio_id == $self->item->biblionumber ); } Koha::Exceptions::Object::FKConstraint->throw( -- 2.47.0