X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FManager%2FCsvImportReport.pm;h=0868767cab52991bf2bebf72496d900c618f5035;hb=951ebae446824a101f4182da5b1f92a493dc7d2a;hp=370a6c97fb86b60fcc1ab68e3bd9b00192de3f64;hpb=d001c791676ec85371465f557cf21e72b09319a4;p=kivitendo-erp.git diff --git a/SL/DB/Manager/CsvImportReport.pm b/SL/DB/Manager/CsvImportReport.pm index 370a6c97f..0868767ca 100644 --- a/SL/DB/Manager/CsvImportReport.pm +++ b/SL/DB/Manager/CsvImportReport.pm @@ -15,24 +15,10 @@ sub cleanup { # get expired reports my $objects = $self->get_all(query => [ - session_id => [ - not => [ $::auth->active_session_ids ] - ] + '!session_id' => [ $::auth->active_session_ids ] ]); $_->destroy for @$objects; - - # get reports for the active session that aren't the latest - $objects = $self->get_all( - query => [ session_id => $::auth->get_session_id, ], - order_by => [ 'id' ], - ); - - # skip the last one - for (0 .. $#$objects - 1) { - $objects->[$_]->destroy; - } } 1; -