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)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 27 Mar 2017 20:16:21 +0000 (16:16 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index da564eb..2cd252a 100644 (file)
@@ -682,9 +682,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);
                 }
             }
 
@@ -695,9 +695,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);
                 }
             }