check for undefined values when mapping item to MARC
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
a91b10dd57
commit
526eafe4e1
1 changed files with 1 additions and 1 deletions
|
@ -775,7 +775,7 @@ sub _marc_from_item_hash {
|
|||
|
||||
# Tack on 'items.' prefix to column names so lookup from MARC frameworks will work
|
||||
# Also, don't emit a subfield if the underlying field is blank.
|
||||
my $mungeditem = { map { $item->{$_} ne '' ?
|
||||
my $mungeditem = { map { (defined($item->{$_}) and $item->{$_} ne '') ?
|
||||
(/^items\./ ? ($_ => $item->{$_}) : ("items.$_" => $item->{$_}))
|
||||
: () } keys %{ $item } };
|
||||
|
||||
|
|
Loading…
Reference in a new issue