From 4e67845b3cf944ee21c77255983e75e734567fbd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 14 Oct 2021 08:38:02 +0200 Subject: [PATCH] Bug 21729: Simplify non-existent expiration date No change in behaviour expected by this patch. Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Florian Bontemps --- Koha/Hold.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index 33ab06f839..c88782bd73 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -596,8 +596,7 @@ sub store { if ( C4::Context->preference('DefaultHoldExpirationdate') - and ( not defined $self->expirationdate - or $self->expirationdate eq '' ) + && !$self->expirationdate ) { $self->_set_default_expirationdate; @@ -611,9 +610,7 @@ sub store { if ( exists $updated_columns{reservedate} ) { if ( C4::Context->preference('DefaultHoldExpirationdate') - and ( not exists $updated_columns{expirationdate} - or exists $updated_columns{expirationdate} - and $updated_columns{expirationdate} eq '' ) + && ! exists $updated_columns{expirationdate} ) { $self->_set_default_expirationdate; -- 2.20.1