From 593a258238aa86155160e94c5800e6c9fa05eab5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 28 Apr 2022 15:44:16 +0200 Subject: [PATCH] Bug 30644: (bug 29788 follow-up) Make Koha::Item->safe_to_delete use Koha::Result::Boolean Fix item deletion Wrong if/else! Test plan: Delete an item Signed-off-by: Nick Clemens Signed-off-by: Fridolin Somers --- cataloguing/additem.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index b7508db1a7..d1db1d15f9 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -378,7 +378,7 @@ if ($op eq "additem") { # check that there is no issue on this item before deletion. my $item = Koha::Items->find($itemnumber); my $deleted = $item->safe_delete; - unless ( $deleted ) { + if ( $deleted ) { print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid"); exit; }