diff --git a/Koha/Item.pm b/Koha/Item.pm index aa46feac46..5aa007b9d8 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1787,7 +1787,7 @@ sub remove_from_bundle { my $bundle_host = $self->bundle_host; - return 0 unless $bundle_host; # Should not we raise an exception here? + return 0 unless $bundle_host; # Should not we raise an exception here? Koha::Exceptions::Item::Bundle::BundleIsCheckedOut->throw if $bundle_host->checkout; diff --git a/Koha/REST/V1/Items.pm b/Koha/REST/V1/Items.pm index c57f52aeb1..5e01a8fa58 100644 --- a/Koha/REST/V1/Items.pm +++ b/Koha/REST/V1/Items.pm @@ -232,8 +232,7 @@ sub add_to_bundle { } ); } - elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::BundleIsCheckedOut' ) - { + elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::BundleIsCheckedOut' ) { return $c->render( status => 409, openapi => { @@ -241,9 +240,7 @@ sub add_to_bundle { error_code => 'bundle_checked_out' } ); - } - elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::ItemIsCheckedOut' ) - { + } elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::ItemIsCheckedOut' ) { return $c->render( status => 409, openapi => {