Browse Source

Fixes to content type creation

Stephen Ficklin 7 years ago
parent
commit
f0201fc309

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

@@ -161,6 +161,7 @@ function tripal_chado_publish_records($values, $job_id = NULL) {
   // Perform the query.
   $sql = $select . $from . $where;
   $records = chado_query($sql, $args);
+
   $transaction = db_transaction();
 
   print "\nNOTE: publishing records is performed using a database transaction. \n" .

+ 1 - 1
tripal_chado/includes/TripalFields/so__cds/so__cds.inc

@@ -62,7 +62,7 @@ class so__cds extends ChadoField {
     );
     $feature = chado_expand_var($feature, 'table', 'featureloc', $options);
     $featurelocs = $feature->featureloc->feature_id;
-    return;
+
     foreach($featurelocs as $featureloc){
       // Generate a CDS sequence if one exsits for this feature alignment.
       $cds_sequence = tripal_get_feature_sequences(

+ 2 - 3
tripal_chado/includes/tripal_chado.field_storage.inc

@@ -1171,7 +1171,7 @@ function tripal_chado_field_storage_bundle_mapping_form_submit($form,
   $default = array(
     'table' => '',
     'has_all' => 'No',
-    'use_cvterm' => 'cv',
+    'use_cvterm' => '',
     'cv_id' => '',
     'use_linker' => 'No',
     'use_prop' => 'No',
@@ -1218,7 +1218,7 @@ function tripal_chado_field_storage_bundle_mapping_form_submit($form,
 
   // If the user selected to use the cvterm table then we have to
   // handle it specially.
-  if ($default['use_cvterm']) {
+  if ($default['use_cvterm'] == 'cv' and !empty($default['cv_id'])) {
     $storage_args['data_table'] = $default['table'];
     $storage_args['type_id'] = $form_state['values']['selected_cvterm_id'];
     $storage_args['type_value'] = '';
@@ -1226,7 +1226,6 @@ function tripal_chado_field_storage_bundle_mapping_form_submit($form,
       $storage_args['type_value'] = $default['cv_id'];
     }
     $storage_args['type_column'] = '';
-
     return;
   }