From 929dcd6c693df5312119669690ade8e34e0e3fea Mon Sep 17 00:00:00 2001 From: Ryan Eby Date: Thu, 15 Aug 2019 11:51:36 -0400 Subject: [PATCH] cancel hold before deleting copy --- iNCIPit.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iNCIPit.cgi b/iNCIPit.cgi index a50a7c5..cecd146 100644 --- a/iNCIPit.cgi +++ b/iNCIPit.cgi @@ -512,7 +512,8 @@ sub item_cancelled { $barcode .= $faidValue; my $copy = copy_from_barcode($barcode); fail( $copy->{textcode} . " $barcode" ) unless ( blessed $copy); - my $r = delete_copy($copy); + my $r = cancel_hold($barcode); + $r = delete_copy($copy); } else { # we are the item agency unless ( $conf->{behavior}->{no_item_agency_holds} =~ m/^y/i ) {