From 10b33bb4cbc74f72338831201c0d9736bc1e67e5 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 18 Oct 2017 21:41:07 +0000 Subject: [PATCH] Bug 18382: [FOLLOW-UP] Ensure user can still enter an empty date Follow above test plan Also check that you can suspend with no date Signed-off-by: Katrin Fischer --- Koha/Hold.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index be05b1f..9bb7c93 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -91,8 +91,11 @@ sub suspend_hold { } $self->suspend(1); - $self->suspend_until( $dt->ymd ); - + if ( defined $dt ){ + $self->suspend_until( $dt->ymd ); + } else { + $self->suspend_until( $dt ); + } $self->store(); logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, Dumper($self->unblessed) ) -- 2.1.4