use direct circ search instead of what-may-be-one-day-deprecated open-ils.cstore...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 7 May 2010 19:04:56 +0000 (19:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 7 May 2010 19:04:56 +0000 (19:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16406 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm

index 7ec012f..b789f57 100644 (file)
@@ -928,13 +928,16 @@ sub logmark {
 # 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 {