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 Nighswonger <chris.nighswonger@gmail.com>
Wed, 10 Nov 2010 14:53:07 +0000 (09:53 -0500)
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>
(cherry picked from commit daabd936d6cb13bd680652da5a32fd1ce354684a)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
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{};