From 0d4a99bcf81b0cb78afc744ba124a54f691cd3a3 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 18 Mar 2010 18:34:29 +0000 Subject: [PATCH] return mapped legacy events from in-db circ, so that precat copies check out properly git-svn-id: svn://svn.open-ils.org/ILS/trunk@15914 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm | 8 +++++++- 1 file changed, 7 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 7da13d6eee..cf1aa196a9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -970,6 +970,7 @@ sub do_copy_checks { } my $LEGACY_CIRC_EVENT_MAP = { + 'no_item' => 'ITEM_NOT_CATALOGED', 'actor.usr.barred' => 'PATRON_BARRED', 'asset.copy.circulate' => 'COPY_CIRC_NOT_ALLOWED', 'asset.copy.status' => 'COPY_NOT_AVAILABLE', @@ -1044,11 +1045,16 @@ sub run_indb_circ_test { my $dbfunc = ($self->is_renewal) ? 'action.item_user_renew_test' : 'action.item_user_circ_test'; + if( $self->is_precat && $self->request_precat) { + $self->make_precat_copy; + return if $self->bail_out; + } + my $results = $self->editor->json_query( { from => [ $dbfunc, $self->editor->requestor->ws_ou, - ($self->is_precat or $self->is_noncat) ? undef : $self->copy->id, + ($self->is_noncat or ($self->is_precat and !$self->override)) ? undef : $self->copy->id, $self->patron->id, ] } -- 2.11.0