From 11bcdcbdfea2768edf29535163344e38363b23b2 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 --- Koha/Item.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index e3ba7ed679e..84a1088a9b7 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1756,14 +1756,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.47.0