Browse Source

Update bundle category on prepare in order to fix incorrectly set categories due to previous bug.

Lacey Sanderson 6 years ago
parent
commit
2edc2d7472
1 changed files with 5 additions and 0 deletions
  1. 5 0
      tripal_chado/includes/setup/tripal_chado.setup.inc

+ 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'] . "...");
   }
 }