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

(-)a/C4/Record.pm (-1 / +4 lines)
Lines 460-466 sub marcrecord2csv { Link Here
460
    # Getting the record
460
    # Getting the record
461
    my $biblio = Koha::Biblios->find($biblionumber);
461
    my $biblio = Koha::Biblios->find($biblionumber);
462
    return unless $biblio;
462
    return unless $biblio;
463
    my $record = $biblio->metadata->record({ embed_items => 1, itemnumbers => $itemnumbers });
463
    my $record = eval {
464
        $biblio->metadata->record(
465
            { embed_items => 1, itemnumbers => $itemnumbers } );
466
    };
464
    return unless $record;
467
    return unless $record;
465
    # Getting the framework
468
    # Getting the framework
466
    my $frameworkcode = $biblio->frameworkcode;
469
    my $frameworkcode = $biblio->frameworkcode;
(-)a/Koha/Biblio/Metadata.pm (+1 lines)
Lines 111-116 sub record { Link Here
111
        my $marcxml_error = $@;
111
        my $marcxml_error = $@;
112
        chomp $marcxml_error;
112
        chomp $marcxml_error;
113
        unless ($record) {
113
        unless ($record) {
114
            warn $marcxml_error;
114
            Koha::Exceptions::Metadata::Invalid->throw(
115
            Koha::Exceptions::Metadata::Invalid->throw(
115
                id             => $self->id,
116
                id             => $self->id,
116
                biblionumber   => $self->biblionumber,
117
                biblionumber   => $self->biblionumber,
(-)a/Koha/Exporter/Record.pm (-5 / +8 lines)
Lines 127-136 sub _get_biblio_for_export { Link Here
127
    return if $@ or not defined $record;
127
    return if $@ or not defined $record;
128
128
129
    if ($export_items) {
129
    if ($export_items) {
130
        C4::Biblio::EmbedItemsInMarcBiblio({
130
        Koha::Biblio::Metadata->record(
131
            marc_record  => $record,
131
            {
132
            biblionumber => $biblionumber,
132
                record       => $record,
133
            item_numbers => $itemnumbers });
133
                embed_items  => 1,
134
                biblionumber => $biblionumber,
135
                item_numbers => $itemnumbers,
136
            }
137
        );
134
        if ($only_export_items_for_branches && @$only_export_items_for_branches) {
138
        if ($only_export_items_for_branches && @$only_export_items_for_branches) {
135
            my %export_items_for_branches = map { $_ => 1 } @$only_export_items_for_branches;
139
            my %export_items_for_branches = map { $_ => 1 } @$only_export_items_for_branches;
136
            my ( $homebranchfield, $homebranchsubfield ) = GetMarcFromKohaField( 'items.homebranch' );
140
            my ( $homebranchfield, $homebranchsubfield ) = GetMarcFromKohaField( 'items.homebranch' );
137
- 

Return to bug 29697