Correct location test for at_circ and at_owning
authorMike Rylander <mrylander@gmail.com>
Thu, 11 Feb 2016 14:15:23 +0000 (09:15 -0500)
committerMike Rylander <mrylander@gmail.com>
Thu, 31 Aug 2017 17:23:15 +0000 (13:23 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index e3e7fa2..75fcbd8 100644 (file)
@@ -692,9 +692,9 @@ sub filter_user_copy_alerts {
                 my $orgs = $U->get_org_descendants($copy_circ_lib);
 
                 if ($U->is_true($a->alert_type->invert_location)) {
-                    next if (grep {$_ == $copy_circ_lib} @$orgs);
+                    next if (grep {$_ == $self->circ_lib} @$orgs);
                 } else {
-                    next unless (grep {$_ == $copy_circ_lib} @$orgs);
+                    next unless (grep {$_ == $self->circ_lib} @$orgs);
                 }
             }
 
@@ -705,9 +705,9 @@ sub filter_user_copy_alerts {
                 my $orgs = $U->get_org_descendants($copy_owning_lib);
 
                 if ($U->is_true($a->alert_type->invert_location)) {
-                    next if (grep {$_ == $copy_owning_lib} @$orgs);
+                    next if (grep {$_ == $self->circ_lib} @$orgs);
                 } else {
-                    next unless (grep {$_ == $copy_owning_lib} @$orgs);
+                    next unless (grep {$_ == $self->circ_lib} @$orgs);
                 }
             }