https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29906
--- Comment #8 from Andrew Nugged <[email protected]> --- it doesn't mean undef explicitly in parameters, but it was meant those two vars to BE undef on the moment when calling: my $params = { ... suspend_until => $suspended_until as I understand this: > Breaks passing "undef" in $hold->suspend_until > as well as "undef" in $body->{suspended_until} this means when on the beginning before this code: my $suspended_until = ... $hold->suspend_until will return undef, or $body->{suspended_until} will be absent at all, so be undef in place, then this code: + my $suspended_until = + exists $body->{suspended_until} + ? dt_from_string( $body->{suspended_until}, 'rfc3339' ) + : dt_from_string( $hold->suspend_until, 'iso' ); won't allow for $suspended_until TO BECOME UNDEF, it will always have the date, and unwanted "TODAY" because when you pass undef to dt_from_string, as it is in: ... return DateTime->now( time_zone => $tz ) unless $date_string; thus that will make any call to this API endpoint to suspend hold. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
