Return msg IDs from process_retrieval for back-compat consistency
authorBill Erickson <berick@esilibrary.com>
Wed, 3 Oct 2012 15:01:55 +0000 (11:01 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 3 Oct 2012 15:01:55 +0000 (11:01 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm

index ee50f41..ada8f9a 100644 (file)
@@ -149,7 +149,7 @@ sub retrieve_core {
             }
             my $incoming = __PACKAGE__->process_retrieval($content, $remote_file, $server, $account->id, $e);
 #           $server->delete(remote_file => $_);   # delete remote copies of saved message
-            push @return, $incoming->id;
+            push @return, @$incoming;
         }
     }
     return \@return;
@@ -168,6 +168,7 @@ sub process_retrieval {
     # create one edi_message per included message
 
     my $messages = OpenILS::Utils::EDIReader->new->read($content);
+    my @return;
 
     for my $msg_hash (@$messages) {
 
@@ -207,7 +208,11 @@ sub process_retrieval {
         }
         $e->update_acq_edi_message($incoming);
         $e->xact_commit;
+
+        push(@return, $incoming->id);
     }
+
+    return \@return;
 }
 
 # ->send_core