From a57cc4645d38b80ec9a8846afcea2d27f22605b4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 11 May 2020 15:13:18 +0200 Subject: [PATCH] Bug 25248: (bug 23463 follow-up) Adjust second occurrence Same as the precedent patch for a single item deletion (vs delete all items) Item is returned if deletion successful, not 1 Signed-off-by: Martin Renvoize --- cataloguing/additem.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 8025241b6f..b0ce8b58c5 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -675,7 +675,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_delete; - if($error ne '1'){ + if(ref($error) eq 'Koha::Item'){ print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid"); }else{ push @errors,$error; -- 2.39.5