From c136ad1d289a0a3e3d0c4106527261cdd6d09e7a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 23 Jun 2020 12:02:35 +0200 Subject: [PATCH] Bug 24152: Allow purge with 0 day Signed-off-by: Jonathan Druart --- misc/cronjobs/cleanup_database.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 891366c70d..fc5db41da3 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -463,9 +463,9 @@ if (defined $pPseudoTransactions or $pPseudoTransactionsFrom or $pPseudoTransact Koha::PseudonymizedTransactions->filter_by_last_update( { timestamp_column_name => 'datetime', - ( $pPseudoTransactions ? ( days => $pPseudoTransactions ) : () ), - ( $pPseudoTransactionsFrom ? ( from => $pPseudoTransactionsFrom ) : () ), - ( $pPseudoTransactionsTo ? ( to => $pPseudoTransactionsTo ) : () ), + ( defined $pPseudoTransactions ? ( days => $pPseudoTransactions ) : () ), + ( $pPseudoTransactionsFrom ? ( from => $pPseudoTransactionsFrom ) : () ), + ( $pPseudoTransactionsTo ? ( to => $pPseudoTransactionsTo ) : () ), } )->delete; print "Done with purging pseudonymized transactions.\n" if $verbose; -- 2.39.5