From 8df88ef0608eb76cb1f7061c193ebaf102a17151 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 27 Nov 2007 14:08:05 -0600 Subject: [PATCH] bug 1616: handle NULL in damaged, wthdrawn, or itemlost columns Signed-off-by: Joshua Ferraro --- catalogue/updateitem.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index b414c30291..41e2dd5a6d 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -41,13 +41,13 @@ my $dbh = C4::Context->dbh; my $item_data_hashref = GetItem($itemnumber, undef); # modify bib MARC -if ($itemlost ne $item_data_hashref->{'itemlost'}) { +if ((not defined($item_data_hashref->{'itemlost'})) or ($itemlost ne $item_data_hashref->{'itemlost'})) { ModItemInMarconefield($biblionumber, $itemnumber, 'items.itemlost', $itemlost); } -if ($wthdrawn ne $item_data_hashref->{'wthdrawn'}) { +if ((not defined($item_data_hashref->{'wthdrawn'})) or ($wthdrawn ne $item_data_hashref->{'wthdrawn'})) { ModItemInMarconefield($biblionumber, $itemnumber, 'items.wthdrawn', $wthdrawn); } -if ($damaged ne $item_data_hashref->{'damaged'}) { +if ((not defined($item_data_hashref->{'damaged'})) or ($damaged ne $item_data_hashref->{'damaged'})) { ModItemInMarconefield($biblionumber, $itemnumber, 'items.damaged', $damaged); } -- 2.39.5