quell warning if updating itemnote whose original value is NULL

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2008-01-03 12:36:20 -06:00 committed by Joshua Ferraro
parent 7ed543b8a7
commit a4919280d2
1 changed files with 4 additions and 2 deletions

View File

@ -53,8 +53,10 @@ for ($damaged,$itemlost,$wthdrawn) {
# modify MARC item if input differs from items table.
my $item_changes = {};
if (defined $itemnotes and ($itemnotes ne $item_data_hashref->{'itemnotes'})) {
$item_changes->{'itemnotes'} = $itemnotes;
if (defined $itemnotes) { # i.e., itemnotes parameter passed from form
if ((not defined $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) {
$item_changes->{'itemnotes'} = $itemnotes;
}
} elsif ($itemlost ne $item_data_hashref->{'itemlost'}) {
$item_changes->{'itemlost'} = $itemlost;
} elsif ($wthdrawn ne $item_data_hashref->{'wthdrawn'}) {