Skip unless we actually have an acp object in Marque.pm.
authorJason Stephenson <jstephenson@mvlc.org>
Thu, 3 Oct 2013 13:19:39 +0000 (09:19 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Tue, 4 Feb 2014 17:55:41 +0000 (12:55 -0500)
For some reason, while running this in the middle of the day, we got an
undefined copy from acps_for_bre in Marque::Biblio.  Since I'm using this
as a stop gap until I write something better, I figured that I would add
a short circuit to skip any unefined acps returned by that method.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/support-scripts/Marque.pm.in

index df0bd7c..36ac1cd 100644 (file)
@@ -464,6 +464,7 @@ sub next {
             if ($Marque::config->option_value('items')) {
                 my @acps = $self->acps_for_bre($bre);
                 foreach my $acp (@acps) {
+                    next unless ($acp);
                     my $location = $Marque::config->option_value('location');
                     my $price = ($acp->price() ? $Marque::config->option_value('money').$acp->price() : '');
                     $r->insert_grouped_field(