From 4ce043f8b246925ea9e7f0174af26bfa8fdf6c01 Mon Sep 17 00:00:00 2001 From: Petro Vashchuk Date: Wed, 19 Jan 2022 18:01:15 +0200 Subject: [PATCH] Bug 29906: fix the forcibly gets to "suspended" state problem which passes "perl false" to $suspended_until as it is, but in case of "perl trush" it calls dt_from_string --- Koha/REST/V1/Holds.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm index 0ca60b1459..8bde3d1531 100644 --- a/Koha/REST/V1/Holds.pm +++ b/Koha/REST/V1/Holds.pm @@ -282,8 +282,8 @@ sub edit { # suspended_until can also be set to undef my $suspended_until = exists $body->{suspended_until} - ? dt_from_string( $body->{suspended_until}, 'rfc3339' ) - : dt_from_string( $hold->suspend_until, 'iso' ); + ? $body->{suspended_until} && dt_from_string( $body->{suspended_until}, 'rfc3339' ) + : $hold->suspend_unti l && dt_from_string( $hold->suspend_until, 'iso' ); my $params = { reserve_id => $hold_id, -- 2.28.0