Bug 19532: (QA follow-up) Move as_list to iterator based loop
Adjusting both new cron jobs. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
a3437fd930
commit
3e2b55f64c
2 changed files with 4 additions and 4 deletions
|
@ -37,8 +37,8 @@ use C4::Log;
|
|||
|
||||
cronlogaction();
|
||||
|
||||
my @recalls = Koha::Recalls->search({ old => undef })->as_list;
|
||||
foreach my $recall (@recalls) {
|
||||
my $recalls = Koha::Recalls->search({ old => undef });
|
||||
while( my $recall = $recalls->next ) {
|
||||
if ( ( $recall->requested or $recall->overdue ) and $recall->expirationdate and dt_from_string( $recall->expirationdate ) < dt_from_string() ){
|
||||
# recall is requested or overdue and has surpassed the specified expiration date
|
||||
$recall->set_expired({ interface => 'COMMANDLINE' });
|
||||
|
|
|
@ -36,8 +36,8 @@ use C4::Log;
|
|||
|
||||
cronlogaction();
|
||||
|
||||
my @recalls = Koha::Recalls->search({ status => 'R' })->as_list;
|
||||
foreach my $recall (@recalls){
|
||||
my $recalls = Koha::Recalls->search({ status => 'R' });
|
||||
while( my $recall = $recalls->next ) {
|
||||
if ( $recall->should_be_overdue ){
|
||||
$recall->set_overdue({ interface => 'COMMANDLINE' });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue