From 7d5772f0b23a93dd60bc650ec9587d87d65b5b30 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Mon, 17 May 2010 17:16:26 +0200 Subject: [PATCH] MT3492 (linked to bug #4263): Fix itemnotes deletion when modifying an item --- C4/Items.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index e0f1dea2fe..37778346e3 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -395,7 +395,7 @@ my %default_values_for_mod_from_marc = ( homebranch => undef, itemcallnumber => undef, itemlost => 0, - itemnotes => undef, + itemnotes => '', itype => undef, location => undef, materials => undef, @@ -424,7 +424,7 @@ sub ModItemFromMarc { my $item = &TransformMarcToKoha( $dbh, $localitemmarc, $frameworkcode, 'items'); foreach my $item_field (keys %default_values_for_mod_from_marc) { - $item->{$item_field} = $default_values_for_mod_from_marc{$item_field} unless (exists $item->{$item_field} or not $default_values_for_mod_from_marc{$item_field}); + $item->{$item_field} = $default_values_for_mod_from_marc{$item_field} unless (exists $item->{$item_field} or not defined $default_values_for_mod_from_marc{$item_field}); } my $unlinked_item_subfields = _get_unlinked_item_subfields($localitemmarc, $frameworkcode); -- 2.39.5