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

(-)a/Koha/Biblio.pm (-1 / +6 lines)
Lines 1713-1719 sub to_api { Link Here
1713
    $args = defined $args ? {%$args} : {};
1713
    $args = defined $args ? {%$args} : {};
1714
    delete $args->{embed};
1714
    delete $args->{embed};
1715
1715
1716
    my $json_biblioitem = $self->biblioitem->to_api($args);
1716
    my $biblioitem = $self->biblioitem;
1717
1718
    Koha::Exceptions::RelatedObjectNotFound->throw( accessor => 'biblioitem', class => 'Koha::Biblioitem' )
1719
        unless $biblioitem;
1720
1721
    my $json_biblioitem = $biblioitem->to_api($args);
1717
    return unless $json_biblioitem;
1722
    return unless $json_biblioitem;
1718
1723
1719
    return { %$json_biblio, %$json_biblioitem };
1724
    return { %$json_biblio, %$json_biblioitem };
(-)a/Koha/Exceptions.pm (-1 / +5 lines)
Lines 37-42 use Exception::Class ( Link Here
37
        isa         => 'Koha::Exception',
37
        isa         => 'Koha::Exception',
38
        description => 'The object have not been created',
38
        description => 'The object have not been created',
39
    },
39
    },
40
    'Koha::Exceptions::RelatedObjectNotFound' => {
41
        isa         => 'Koha::Exception',
42
        description => 'The requested related object does not exist',
43
        fields      => [ 'accessor', 'class' ],
44
    },
40
    'Koha::Exceptions::CannotDeleteDefault' => {
45
    'Koha::Exceptions::CannotDeleteDefault' => {
41
        isa         => 'Koha::Exception',
46
        isa         => 'Koha::Exception',
42
        description => 'The default value cannot be deleted'
47
        description => 'The default value cannot be deleted'
43
- 

Return to bug 35246