Преглед изворни кода

Fixed bug with publishing cvterm records

Stephen Ficklin пре 8 година
родитељ
комит
b9e95ece81

+ 1 - 1
tripal_chado/api/tripal_chado.api.inc

@@ -125,7 +125,7 @@ function tripal_chado_publish_records($values, $job_id = NULL) {
   // use all of the child terms.
   if ($table == 'cvterm' and !$type_value) {
     $where .= "AND T.cvterm_id IN (
-       SELECT CVTS.cvterm_id
+       SELECT CVTP.subject_id
        FROM {cvtermpath} CVTP
        WHERE CVTP.object_id = :cvterm_id)
      ";

+ 4 - 1
tripal_chado/includes/tripal_chado.field_storage.inc

@@ -728,7 +728,10 @@ function tripal_chado_field_storage_bundle_mapping_form($form, &$form_state,
   if ($default['table'] == 'cvterm') {
     tripal_chado_field_storage_bundle_mapping_form_add_cvterm($form,
         $form_state, $term, $default);
-    if ($default['cv_id']) {
+    if ($default['use_cvterm'] == 'cv' and $default['cv_id']) {
+      $submit_disabled = FALSE;
+    }
+    if ($default['use_cvterm'] == 'parent') {
       $submit_disabled = FALSE;
     }
     return $form;