From 2375c2f44d1c3115fb6745ee19a1dc413a4beb16 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Tue, 11 Aug 2020 15:34:45 -0400 Subject: [PATCH] thinko with branch handling Signed-off-by: Jason Etheridge --- emig.d/bin/mig-bibstats | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/emig.d/bin/mig-bibstats b/emig.d/bin/mig-bibstats index 1c7013a..a917208 100755 --- a/emig.d/bin/mig-bibstats +++ b/emig.d/bin/mig-bibstats @@ -187,7 +187,7 @@ while ( my $record = $batch->next() ) { my @holding_fields = $record->field($p_holding_code); foreach my $hf (@holding_fields) { my $item_type = $hf->subfield($p_item_type_subfield) || ''; - my $branch = $p_branch_subfield || 'default'; + my $branch = $p_branch_subfield ? $f->subfield($p_branch_subfield) || 'default'; if (! defined $bib_types_by_item_type{ $branch }) { $bib_types_by_item_type{ $branch } = {}; } -- 1.7.2.5