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.
This commit is contained in:
Martin Renvoize 2024-11-04 13:08:06 +00:00
parent f75bd50d28
commit 9cfb92c206
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 7 additions and 2 deletions

View File

@ -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(