Browse Source

Fixed bug in GFF loader when no phase is provided

Stephen Ficklin 8 years ago
parent
commit
664957bd0e

+ 3 - 1
tripal_chado/includes/loaders/tripal_chado.gff_loader.inc

@@ -1351,8 +1351,10 @@ function tripal_feature_load_gff3_parents($feature, $cvterm, $parents,
           'fmin' => $fmin,
           'fmax' => $fmax,
           'strand' => $strand,
-          'phase' => $phase,
         );
+        if ($phase) {
+         $values['phase'] = $phase;
+        }
         $result = chado_insert_record('tripal_gffcds_temp', $values);
         if (!$result) {
           tripal_report_error('tripal_chado', TRIPAL_ERROR, "Cound not save record in temporary CDS table, Cannot continue.", array());

+ 1 - 1
tripal_chado/includes/tripal_chado.setup.inc

@@ -753,7 +753,7 @@ function tripal_chado_add_tripal_gffcds_temp_table($skip_recreate = TRUE) {
       ),
       'phase' => array(
         'type' => 'int',
-        'not null' => TRUE,
+        'not null' => FALSE,
       ),
       'strand' => array(
         'type' => 'int',