From 6e452b520f69b7cfea65f682f0821af395362b46 Mon Sep 17 00:00:00 2001 From: Barton Chittenden Date: Wed, 25 May 2016 07:12:43 -0700 Subject: [PATCH] Bug 14504: (QA followup) fix test transaction, book_on_loan Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall --- misc/cronjobs/delete_items.pl | 2 +- t/db_dependent/Circulation/IsItemIssued.t | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/delete_items.pl b/misc/cronjobs/delete_items.pl index f3d3de6852..0e9e8d184b 100755 --- a/misc/cronjobs/delete_items.pl +++ b/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 { diff --git a/t/db_dependent/Circulation/IsItemIssued.t b/t/db_dependent/Circulation/IsItemIssued.t index 907a3cf7d6..bafc4054f2 100644 --- a/t/db_dependent/Circulation/IsItemIssued.t +++ b/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} }; -- 2.39.5