Exports are broken
[working/Evergreen.git] / Open-ILS / src / perlmods / lib / OpenILS / WWW / Exporter.pm
index 2fc4462..b9fea03 100644 (file)
@@ -218,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;