Exports are broken
authorMark Cooper <markchristophercooper@gmail.com>
Mon, 6 May 2013 19:37:32 +0000 (12:37 -0700)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 7 May 2013 17:42:50 +0000 (13:42 -0400)
Proposed fix for lp1175816, tested with 2.3.2 / 2.4.0.

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
Open-ILS/src/support-scripts/marc_export.in

index 373effd..b9fea03 100644 (file)
@@ -219,9 +219,9 @@ sub handler {
                        if ($holdings) {
                                $req->delete_field( $_ ) for ($req->field('852')); # remove any legacy 852s
 
-                               my $cn_list = [ grep { $_->deleted eq 'f' } @{ $bib->call_numbers } ];
+                               my $cn_list = $bib->call_numbers;
                                if ($cn_list && @$cn_list) {
-
+                                                       $cn_list = [ grep { $_->deleted eq 'f' } @$cn_list ];
                                        my $cp_list = [ grep { $_->deleted eq 'f' } map { @{ $_->copies } } @$cn_list ];
                                        if ($cp_list && @$cp_list) {
 
index 709c613..3de8397 100755 (executable)
@@ -383,9 +383,9 @@ sub add_bib_holdings {
     my $bib = shift;
     my $r = shift;
 
-    my $cn_list = [ grep { $_->deleted eq 'f' } @{ $bib->call_numbers } ];
+    my $cn_list = $bib->call_numbers;
     if ($cn_list && @$cn_list) {
-
+        $cn_list = [ grep { $_->deleted eq 'f' } @$cn_list ];
         $count{cn} += @$cn_list;
 
         my $cp_list = [ grep { $_->deleted eq 'f' } map { @{ $_->copies } } @$cn_list ];