[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 0b0eac3f88fa4c26a2997f8a26ae795b38e32525

Evergreen Git git at git.evergreen-ils.org
Tue Jun 21 23:37:57 EDT 2011


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_0 has been updated
       via  0b0eac3f88fa4c26a2997f8a26ae795b38e32525 (commit)
      from  2d646ac68446c5e9ef6c431f9bccbf36f8f896f7 (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 0b0eac3f88fa4c26a2997f8a26ae795b38e32525
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Tue Jun 21 11:44:10 2011 -0400

    MFHD compressed holdings short-circuit logic
    
    If you attempt to get compressed (or uncompressed) holdings from
    a MFHD record with only a caption, the code should short-circuit
    and return an empty list.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/MFHD.pm b/Open-ILS/src/perlmods/OpenILS/Utils/MFHD.pm
index 48f00cb..5b728c0 100644
--- a/Open-ILS/src/perlmods/OpenILS/Utils/MFHD.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Utils/MFHD.pm
@@ -357,6 +357,8 @@ sub get_compressed_holdings {
         @decomp_holdings = $self->get_decompressed_holdings($caption, {'dedupe' => 1});
     }
 
+    return () if !@decomp_holdings;
+
     my $runner = $decomp_holdings[0]->clone->increment;   
     my $curr_holding = shift(@decomp_holdings);
     $curr_holding = $curr_holding->clone;
@@ -414,6 +416,9 @@ sub get_decompressed_holdings {
     my $link_id = $caption->link_id;
     $htag =~ s/^85/86/;
     my @holdings = $self->holdings($htag, $link_id);
+
+    return () if !@holdings;
+
     my @decomp_holdings;
 
     foreach my $holding (@holdings) {

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

Summary of changes:
 Open-ILS/src/perlmods/OpenILS/Utils/MFHD.pm |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list