From f11b70e90eac4362d5422674f82566bf2e07460c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 18 Dec 2012 07:47:09 -0500 Subject: [PATCH] Bug 9231 - Batch revert staged MARC records fails if one or more records in a batch have been deleted. --- C4/Items.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 4a8439a..8a44fa0 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -618,7 +618,7 @@ sub DelItem { # backup the record my $copy2deleted = $dbh->prepare("UPDATE deleteditems SET marc=? WHERE itemnumber=?"); - $copy2deleted->execute( $record->as_usmarc(), $itemnumber ); + eval { $copy2deleted->execute( $record->as_usmarc(), $itemnumber ); }; warn $@ if $@; # This last update statement makes that the timestamp column in deleteditems is updated too. If you remove these lines, please add a line to update the timestamp separately. See Bugzilla report 7146 and Biblio.pm (DelBiblio). #search item field code -- 1.7.2.5