From cc6f25fec44273ed1407c910544af04c4700817e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 10 Dec 2019 12:58:09 +0100 Subject: [PATCH] Bug 23463: (follow-up) Remove DelItemCheck and ItemSafeToDelete Wrong replacement in additem.pl Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- cataloguing/additem.pl | 2 +- tools/batch_delete_records.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 4281658612..ec27c1a426 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -670,7 +670,7 @@ if ($op eq "additem") { #------------------------------------------------------------------------------- # check that there is no issue on this item before deletion. my $item = Koha::Items->find($itemnumber); - $error = $item->safe_to_delete; + $error = $item->safe_delete; if($error ne '1'){ print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid"); }else{ diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl index 7604a96652..d1ab80c892 100755 --- a/tools/batch_delete_records.pl +++ b/tools/batch_delete_records.pl @@ -183,7 +183,7 @@ if ( $op eq 'form' ) { type => 'error', code => 'item_not_deleted', biblionumber => $biblionumber, - itemnumber => $itemnumber, + itemnumber => $item->itemnumber, error => ($@ ? $@ : $error), }; $schema->storage->txn_rollback; -- 2.39.5