From 50b9af836e8bbe6454115f09df3f69d529dced5e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 18 Oct 2024 09:10:00 +0100 Subject: [PATCH] Bug 35906: (QA follow-up) Ensure we return effective_bookable The API wasn't including the effective_bookable value in responses Signed-off-by: Martin Renvoize Signed-off-by: Paul Derscheid Signed-off-by: Katrin Fischer --- Koha/Item.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index 183f579967..3e3c1a6252 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1799,14 +1799,14 @@ Overloaded to_api method to ensure item-level itypes is adhered to. =cut sub to_api { - my ($self, $params) = @_; + my ( $self, $params ) = @_; my $response = $self->SUPER::to_api($params); - my $overrides = {}; - - $overrides->{effective_item_type_id} = $self->effective_itemtype; + my $overrides = {}; + $overrides->{effective_item_type_id} = $self->effective_itemtype; $overrides->{effective_not_for_loan_status} = $self->effective_not_for_loan_status; + $overrides->{effective_bookable} = $self->effective_bookable; return { %$response, %$overrides }; } -- 2.39.5