[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. 3f0d3f8edffbdd323f23c7a8b86b7689b43435a6

Evergreen Git git at git.evergreen-ils.org
Fri Jul 12 10:26:43 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_3 has been updated
       via  3f0d3f8edffbdd323f23c7a8b86b7689b43435a6 (commit)
      from  eb0b61fc74a27035237250e8b758ed2d33903d57 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3f0d3f8edffbdd323f23c7a8b86b7689b43435a6
Author: Steven Chan <schan at sitka.bclibraries.ca>
Date:   Sat Jun 15 13:06:43 2013 -0400

    Fix LP1177916, Cannot activate PO which contains only direct charges
    We add a safety check in the function
    Application/Acq/Order.pm/create_lineitem_list_assets(), which is called
    by create_po_assets(), which is the service call initiated by the user
    trying to activate a PO.
    
    The safety check prevents the function from processing if there are no
    line items specified in the arguments.
    
    P.S. It would be better to stop the sequence of events earlier in the
    client, but that will need more coding, which can been done in another
    fix.
    
    Signed-off-by: Steven Chan <schan at sitka.bclibraries.ca>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
index fbf9015..06aa7c4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -299,6 +299,9 @@ sub delete_lineitem {
 sub create_lineitem_list_assets {
     my($mgr, $li_ids, $vandelay, $bib_only) = @_;
 
+    # Do not create line items if none are specified
+    return {} unless (scalar(@$li_ids));
+
     if (check_import_li_marc_perms($mgr, $li_ids)) { # event on error
         $logger->error("acq-vl: user does not have permission to import acq records");
         return undef;

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Acq/Order.pm  |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list