Bug 37305: (follow-up) Only add control number subfield when defined
The previous commit introduced a bug where the control number subfield 'w'
was being added to the MARC field even when undefined, causing test failures.
This patch adds a condition to only push the control number subfield when
the value is actually defined, matching the pattern used for other subfields
in the method.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32860c2778)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
a5949e7575
commit
ad7a9355a3
|
|
@ -2013,7 +2013,7 @@ sub generate_marc_host_field {
|
|||
$w = '(' . $host_field->data() . ')' . $w;
|
||||
}
|
||||
|
||||
push @sfd, ( w => $w );
|
||||
push @sfd, ( w => $w ) if $w;
|
||||
}
|
||||
$link_field = MARC::Field->new( 773, '0', ' ', @sfd );
|
||||
} elsif ( $marcflavour eq 'UNIMARC' ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue