View | Details | Raw Unified | Return to bug 33817
Collapse All | Expand All

(-)a/Koha/Item.pm (-1 / +1 lines)
Lines 1790-1796 sub remove_from_bundle { Link Here
1790
1790
1791
    my $bundle_host = $self->bundle_host;
1791
    my $bundle_host = $self->bundle_host;
1792
1792
1793
    return 0 unless $bundle_host; # Should not we raise an exception here?
1793
    return 0 unless $bundle_host;    # Should not we raise an exception here?
1794
1794
1795
    Koha::Exceptions::Item::Bundle::BundleIsCheckedOut->throw if $bundle_host->checkout;
1795
    Koha::Exceptions::Item::Bundle::BundleIsCheckedOut->throw if $bundle_host->checkout;
1796
1796
(-)a/Koha/REST/V1/Items.pm (-6 / +2 lines)
Lines 327-334 sub add_to_bundle { Link Here
327
                }
327
                }
328
            );
328
            );
329
        }
329
        }
330
        elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::BundleIsCheckedOut' )
330
        elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::BundleIsCheckedOut' ) {
331
        {
332
            return $c->render(
331
            return $c->render(
333
                status  => 409,
332
                status  => 409,
334
                openapi => {
333
                openapi => {
Lines 336-344 sub add_to_bundle { Link Here
336
                    error_code => 'bundle_checked_out'
335
                    error_code => 'bundle_checked_out'
337
                }
336
                }
338
            );
337
            );
339
        }
338
        } elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::ItemIsCheckedOut' ) {
340
        elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::ItemIsCheckedOut' )
341
        {
342
            return $c->render(
339
            return $c->render(
343
                status  => 409,
340
                status  => 409,
344
                openapi => {
341
                openapi => {
345
- 

Return to bug 33817