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 <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-05-11 15:13:18 +02:00 committed by Martin Renvoize
parent 04ce87c4c0
commit a57cc4645d
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -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;