Exports are broken
[working/Evergreen.git] / Open-ILS / src / perlmods / lib / OpenILS / WWW / Exporter.pm
index 502df6a..b9fea03 100644 (file)
@@ -47,6 +47,7 @@ sub import {
 
 sub child_init {
         OpenSRF::System->bootstrap_client( config_file => $bootstrap );
+        return Apache2::Const::OK;
 }
 
 sub handler {
@@ -217,10 +218,11 @@ sub handler {
 
                        if ($holdings) {
                                $req->delete_field( $_ ) for ($req->field('852')); # remove any legacy 852s
+
                                my $cn_list = $bib->call_numbers;
                                if ($cn_list && @$cn_list) {
-
-                                       my $cp_list = [ map { @{ $_->copies } } @$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) {
 
                                                my %cn_map;