added option to flesh import items on queued record retrieval
authorberick <berick@esilibrary.com>
Mon, 25 Apr 2011 13:56:58 +0000 (09:56 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 6 Jul 2011 18:50:50 +0000 (14:50 -0400)
Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm

index 3516fd3..59dc39b 100644 (file)
@@ -457,10 +457,9 @@ sub retrieve_queued_records {
         'retrieve_vandelay_queued_bib_record' : 'retrieve_vandelay_queued_authority_record';
 
     for my $rec_id (@$record_ids) {
-        my $params = {   
-            flesh => 1,
-            flesh_fields => {$class => ['attributes', 'matches']},
-        };
+        my $flesh = ['attributes', 'matches'];
+        push(@$flesh, 'import_items') if $$options{flesh_import_items};
+        my $params = {flesh => 1, flesh_fields => {$class => $flesh}};
         my $rec = $e->$retrieve([$rec_id->{id}, $params]);
         $rec->clear_marc if $$options{clear_marc};
         $conn->respond($rec);