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 <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2022-04-28 15:44:16 +02:00 committed by Fridolin Somers
parent c48aac0ffc
commit 593a258238

View file

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