From 2fff1c66a73161e9969ed4354e4824c589daf19e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 28 Mar 2018 19:58:37 +0000 Subject: [PATCH] Bug 18382: (QA follow-up) Make new unit test pass Signed-off-by: Jonathan Druart --- Koha/Hold.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index e76b9fb17e..afdafb8028 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -83,7 +83,7 @@ my $hold = $hold->suspend_hold( $suspend_until_dt ); sub suspend_hold { my ( $self, $dt ) = @_; - $dt = $dt ? $dt->clone()->truncate( to => 'day' ) : undef; + my $date = $dt ? $dt->clone()->truncate( to => 'day' )->datetime : undef; if ( $self->is_waiting ) { # We can't suspend waiting holds carp "Unable to suspend waiting hold!"; @@ -91,7 +91,7 @@ sub suspend_hold { } $self->suspend(1); - $self->suspend_until( $dt->datetime ) if ( defined $dt ); + $self->suspend_until( $date ); $self->store(); logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, Dumper($self->unblessed) ) -- 2.39.5