return $self->bail_on_events($self->editor->event)
unless $self->editor->update_action_hold_request($hold);
+ $holdcode->delete_hold_copy_maps($self->editor, $hold->id);
+
push( @fulfilled, $hold->id );
}
$e->update_action_hold_request($hold)
or return $e->event;
+ $self->delete_hold_copy_maps($e, $hold->id);
+
$e->commit;
return 1;
}
+sub delete_hold_copy_maps {
+ my $class = shift;
+ my $editor = shift;
+ my $holdid = shift;
+
+ my $maps = $editor->search_action_hold_copy_map({hold=>$holdid});
+ for(@$maps) {
+ $editor->delete_action_hold_copy_map($_)
+ or return $editor->event;
+ }
+ return undef;
+}
+
__PACKAGE__->register_method(
method => "update_hold",