Răsfoiți Sursa

Remove unwanted chado_set_active call

Abdullah Almsaeed 7 ani în urmă
părinte
comite
eb285ba0ed
1 a modificat fișierele cu 2 adăugiri și 4 ștergeri
  1. 2 4
      tripal_chado/api/modules/tripal_chado.cv.api.inc

+ 2 - 4
tripal_chado/api/modules/tripal_chado.cv.api.inc

@@ -400,14 +400,12 @@ function tripal_update_cvtermpath($cv_id, $job_id = NULL){
     }
     }
   }
   }
   catch (Exception $e) {
   catch (Exception $e) {
-    // If there's an exception we have to set the database back. So, do that
-    // and then rethrow the error.
-    chado_set_active($prev_db);
-
     // Rollback any database changes
     // Rollback any database changes
     $transaction->rollback();
     $transaction->rollback();
     throw $e;
     throw $e;
   }
   }
+
+  // Set the database back
   chado_set_active($prev_db);
   chado_set_active($prev_db);
 }
 }