bug 5372: identify empty field in authority record correctly
authorGalen Charlton <gmcharlt@gmail.com>
Wed, 10 Nov 2010 04:48:33 +0000 (23:48 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 10 Nov 2010 06:48:52 +0000 (19:48 +1300)
This is the sibling to the fix for this bug for the bib
editor.  However, note that this change won't have a
direct effect yet, as currently you can't specify a
default value for a field or subfield in the authority
MARC frameworks.  See bug 4887.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
authorities/authorities.pl

index 2973697..468021c 100755 (executable)
@@ -130,7 +130,7 @@ sub create_input {
     }
 
     # if there is no value provided but a default value in parameters, get it
-    unless ($value) {
+    if ($value eq '') {
         $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
         if (!defined $value) {
             $value = q{};