[open-ils-commits] r16406 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri May 7 15:05:01 EDT 2010


Author: erickson
Date: 2010-05-07 15:04:56 -0400 (Fri, 07 May 2010)
New Revision: 16406

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
Log:
use direct circ search instead of what-may-be-one-day-deprecated open-ils.cstore.direct.action.open_circulation.search view API call in circ fetching utility function

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2010-05-07 18:54:14 UTC (rev 16405)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2010-05-07 19:04:56 UTC (rev 16406)
@@ -928,13 +928,16 @@
 # takes a copy id 
 sub fetch_open_circulation {
 	my( $self, $cid ) = @_;
-	my $evt;
 	$self->logmark;
-	my $circ = $self->cstorereq(
-		'open-ils.cstore.direct.action.open_circulation.search',
-		{ target_copy => $cid, stop_fines_time => undef } );
-	$evt = OpenILS::Event->new('ACTION_CIRCULATION_NOT_FOUND') unless $circ;	
-	return ($circ, $evt);
+
+	my $e = OpenILS::Utils::CStoreEditor->new;
+    my $circ = $e->search_action_circulation({
+        target_copy => $cid, 
+        stop_fines_time => undef, 
+        checkin_time => undef
+    })->[0];
+    
+    return ($circ, $e->event);
 }
 
 sub fetch_all_open_circulation {



More information about the open-ils-commits mailing list