create events after the commit to prevent any possible race condition. also, no...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Apr 2009 19:37:53 +0000 (19:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Apr 2009 19:37:53 +0000 (19:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12949 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index dea519d..0e27cd0 100644 (file)
@@ -316,7 +316,7 @@ sub update_patron {
        ($new_patron, $evt) = _create_perm_maps($session, $user_session, $patron, $new_patron, $user_obj);
        return $evt if $evt;
 
-       $logger->activity("user ".$user_obj->id." updating/creating  user ".$new_patron->id);
+       $apputils->commit_db_session($session);
 
     my $tses = OpenSRF::AppSession->create('open-ils.trigger');
        if($patron->isnew) {
@@ -325,8 +325,6 @@ sub update_patron {
         $tses->request('open-ils.trigger.event.autocreate', 'au.update', $new_patron, $new_patron->home_ou);
     }
 
-       $apputils->commit_db_session($session);
-
        return flesh_user($new_patron->id(), new_editor(requestor => $user_obj));
 }