@@ -, +, @@ --- misc/cronjobs/delete_items.pl | 2 +- t/db_dependent/Circulation/IsItemIssued.t | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) --- a/misc/cronjobs/delete_items.pl +++ a/misc/cronjobs/delete_items.pl @@ -58,7 +58,7 @@ $GLOBAL->{sth}->{target_items}->execute(); DELITEM: while ( my $item = $GLOBAL->{sth}->{target_items}->fetchrow_hashref() ) { my $status = C4::Items::ItemSafeToDelete( $item->{itemnumber}, $item->{biblionumber} ); - if( $status == 1 ) { + if( $status eq '1' ) { C4::Items::DelItemCheck( $item->{itemnumber}, $item->{biblionumber} ); verbose "Deleting '$item->{itemnumber}'"; } else { --- a/t/db_dependent/Circulation/IsItemIssued.t +++ a/t/db_dependent/Circulation/IsItemIssued.t @@ -58,6 +58,8 @@ is( 'item that is not on loan can be deleted', ); +$schema->storage->txn_rollback; + # C4::Context->userenv sub Mock_userenv { return { branch => $library->{branchcode} }; --