Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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 {
'item that is not on loan can be deleted',
);
+$schema->storage->txn_rollback;
+
# C4::Context->userenv
sub Mock_userenv {
return { branch => $library->{branchcode} };