From f3b65f120033d21ae48f42f77898ed9f2d8a7f2e Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 9 Aug 2006 22:11:03 +0000 Subject: [PATCH] added further sanity check to prevent db update errors git-svn-id: svn://svn.open-ils.org/ILS/trunk@5412 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 799e3f763a..41f2b158a5 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -1325,11 +1325,13 @@ sub attempt_checkin_hold_capture { $hold->current_copy($copy->id); $hold->capture_time('now'); - # prevent some DB errors + # prevent DB errors caused by fetching + # holds from storage, and updating through cstore $hold->clear_fulfillment_time; $hold->clear_fulfillment_staff; $hold->clear_fulfillment_lib; $hold->clear_expire_time; + $hold->clear_cancel_time; $self->bail_on_events($self->editor->event) unless $self->editor->update_action_hold_request($hold); @@ -1343,6 +1345,9 @@ sub attempt_checkin_hold_capture { # This hold was captured in the correct location $copy->status(OILS_COPY_STATUS_ON_HOLDS_SHELF); $self->push_events(OpenILS::Event->new('SUCCESS')); + my $evt = $holdcode->hold_email_notifify( + $self->editor, $hold, $self->title, $self->volume, $self->copy ); + $self->bail_on_events($evt) if $evt; } else { -- 2.11.0