# the clear-shelf cache. But, only add them to the pl_changed
# list if they are not otherwise getting canceled by this process.
pl_changed => 1 ? # TODO ORG SETTING
- pickup_lib_changed_on_shelf_holds($e, $org_id, @hold_ids) : []
+ pickup_lib_changed_on_shelf_holds($e, $org_id, \@hold_ids) : []
);
for my $hold (@holds) {
my $e = shift;
my $org_id = shift;
my $ignore_holds = shift;
+ $ignore_holds = [$ignore_holds] if !ref($ignore_holds);
my $query = {
select => { alhr => ['id'] },
}
};
- $query->{where}->{'+alhr'}->{id} = {'!=' => $ignore_holds} if $ignore_holds;
+ $query->{where}->{'+alhr'}->{id} =
+ {'not in' => $ignore_holds} if @$ignore_holds;
my $hold_ids = $e->json_query($query);
return map { $_->{id} } @$hold_ids;