Skip to content

Commit

Permalink
Bug 34355: Fix referencing of import_record_id_selected
Browse files Browse the repository at this point in the history
  • Loading branch information
mblenk committed Aug 10, 2023
1 parent f2503d9 commit 818afb6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Koha/MarcOrder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use C4::Biblio qw(
AddBiblio
GetMarcFromKohaField
TransformHtmlToXml
GetMarcQuantity
);
use C4::Items qw( AddItemFromMarc );
use C4::Budgets qw( GetBudgetByCode );
Expand Down Expand Up @@ -163,7 +164,7 @@ sub import_record_and_create_order_lines {
my ( $self, $args ) = @_;

my $import_batch_id = $args->{import_batch_id};
my @import_record_id_selected = $args->{import_record_id_selected} || ();
my $import_record_id_selected = $args->{import_record_id_selected} || ();
my $matcher_id = $args->{matcher_id};
my $overlay_action = $args->{overlay_action};
my $import_record = $args->{import_record};
Expand All @@ -179,7 +180,7 @@ sub import_record_and_create_order_lines {
matcher_id => $matcher_id,
overlay_action => $overlay_action,
agent => $agent,
import_record_id_selected => @import_record_id_selected,
import_record_id_selected => $import_record_id_selected,
});

return {
Expand Down Expand Up @@ -476,7 +477,7 @@ sub add_biblios_from_import_record {
my ( $args ) = @_;

my $import_batch_id = $args->{import_batch_id};
my @import_record_id_selected = $args->{import_record_id_selected} || ();
my $import_record_id_selected = $args->{import_record_id_selected} || ();
my $matcher_id = $args->{matcher_id};
my $overlay_action = $args->{overlay_action};
my $import_record = $args->{import_record};
Expand All @@ -489,7 +490,7 @@ sub add_biblios_from_import_record {
record_result => 0,
duplicates_in_batch => 0,
skip => 1
} if not grep { $_ eq $import_record->import_record_id } @import_record_id_selected;
} if not grep { $_ eq $import_record->import_record_id } @{$import_record_id_selected};
}

my $marcrecord = $import_record->get_marc_record || die "Couldn't translate marc information";
Expand Down

0 comments on commit 818afb6

Please sign in to comment.