Browse Source

Fixed issue with adding new terms

Stephen Ficklin 6 years ago
parent
commit
aee5ac6c73

+ 2 - 2
tripal/includes/tripal.jobs.inc

@@ -347,7 +347,7 @@ function tripal_jobs_view($job_id) {
     '#collapsed' => TRUE,
     '#collapsible' => TRUE,
     '#attributes' => array(
-      'class' => array('collapsible', 'collapsed'),
+      'class' => array('collapsible'),
     ),
     '#attached' => array(
       'js' => array('misc/collapse.js', 'misc/form.js')
@@ -363,7 +363,7 @@ function tripal_jobs_view($job_id) {
     '#collapsed' => TRUE,
     '#collapsible' => TRUE,
     '#attributes' => array(
-      'class' => array('collapsible', 'collapsed'),
+      'class' => array('collapsible'),
     ),
     '#attached' => array(
       'js' => array('misc/collapse.js', 'misc/form.js')

+ 4 - 5
tripal_chado/api/ChadoRecord.inc

@@ -170,10 +170,7 @@ class ChadoRecord {
       foreach ($col_schema as $param => $val) {
         if (preg_match('/not null/i', $param) and $col_schema[$param]) {
           $this->required_cols[] = $column;
-          // Currently all required columns are missing except the primary key.
-          if ($column == $this->pkey) {
-            continue;
-          }
+          // Currently all required columns are missing.
           $this->missing_required_col[$column] = TRUE;
         }
       }
@@ -307,7 +304,9 @@ class ChadoRecord {
     try {
       $result = chado_query($sql, $insert_args);
       if ($this->pkey) {
-        $this->values[$this->pkey] = $result->fetchField();
+        $record_id = $result->fetchField();
+        $this->values[$this->pkey] = $record_id;
+        $this->record_id = $record_id;
       }
     }
     catch (Exception $e) {

+ 1 - 0
tripal_chado/includes/TripalImporter/OBOImporter.inc

@@ -1235,6 +1235,7 @@ class OBOImporter extends TripalImporter {
         'dbxref_id' => $dbxref->getID(),
         'is_relationshiptype' => $is_relationshiptype,
         'is_obsolete' => $is_obsolete,
+        'dbxref_id' => $dbxref->getValue('dbxref_id'),
       ]);
       
       // If the insert failes lets catch the error so we can