From 426103b319f47b9b1dee6846da347c59c8acf816 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 --- 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.20.1