Fixes a bug where the hold possibility checks for metarecords used the
depth of the selection OU instead of depth 0 when no depth was defined.
This prevented holds from being placed in some instances, particularly
when no hold boundaries were defined (or equaled zero).
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
} elsif( $hold_type eq OILS_HOLD_TYPE_METARECORD ) {
+ # pasing undef as the depth to filtered_records causes the depth
+ # of the selection_ou to be used, which is not what we want here.
+ $depth ||= 0;
my ($recs) = __PACKAGE__->method_lookup('open-ils.circ.holds.metarecord.filtered_records')->run($mrid, $holdable_formats, $selection_ou, $depth);
my @status = ();