check to see if array reference is empty, instead of this always true condition
authorJason Etheridge <jason@EquinoxOLI.org>
Fri, 10 Feb 2023 15:11:04 +0000 (10:11 -0500)
committerJason Etheridge <jason@EquinoxOLI.org>
Fri, 10 Feb 2023 15:11:04 +0000 (10:11 -0500)
Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

index af68d74..d295fa2 100644 (file)
@@ -2889,7 +2889,7 @@ sub _check_title_hold_is_possible {
             record => $titleid
         }, {idlist=>1} );
 
-    if ($parts) {
+    if (@$parts) {
         my $part_required_flag = $e->retrieve_config_global_flag('circ.holds.api_require_monographic_part_when_present');
         $part_required = ($part_required_flag and $U->is_true($part_required_flag->enabled));
         if (!$part_required) {