From 542792b593b345c5b7624c6948846ab03b1f96e7 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 --- cataloguing/additem.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index b7508db1a74..d1db1d15f92 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; } -- 2.25.1