Browse Source

Merge pull request #755 from tripal/744-bundle_category

Bundle Category not set correctly
Bradford Condon 6 years ago
parent
commit
26c16df030

+ 1 - 1
tripal/api/tripal.entities.api.inc

@@ -542,7 +542,7 @@ function tripal_create_bundle($args, $job = NULL) {
     }
 
     // Set the bundle category
-    $category = array_key_exists('bundle_category', $args) ? $args['bundle_category'] : 'Other';
+    $category = array_key_exists('category', $args) ? $args['category'] : 'Other';
     tripal_set_bundle_variable('bundle_category', $bundle->id, $category);
 
     // Attache the bundle fields.

+ 5 - 0
tripal_chado/includes/setup/tripal_chado.setup.inc

@@ -782,6 +782,11 @@ function _tripal_chado_prepare_create_bundle($args, $job) {
     }
   }
   else {
+
+    // Update the bundle category in case it was set incorrectly.
+    $category = array_key_exists('category', $args) ? $args['category'] : 'Other';
+    tripal_set_bundle_variable('bundle_category', $bundle->id, $category);
+
     drush_print("Content type already created (skipping): " . $args['term_name'] . "...");
   }
 }