浏览代码

Should not require foreign keys in table check in chado_node_generate_tokens

Stephen Ficklin 9 年之前
父节点
当前提交
044952039b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tripal_core/api/tripal_core.chado_nodes.title_and_path.inc

+ 1 - 1
tripal_core/api/tripal_core.chado_nodes.title_and_path.inc

@@ -1268,7 +1268,7 @@ function chado_node_generate_tokens($base_table, $token_prefix = FALSE, $locatio
 
   // RECURSION:
   // Follow the foreign key relationships recursively
-  foreach ($table_descrip['foreign keys'] as $table => $details) {
+  foreach (array_key_exists('foreign keys', $table_descrip) and $table_descrip['foreign keys'] as $table => $details) {
     foreach ($details['columns'] as $left_field => $right_field) {
       if (empty($token_prefix)) {
         $sub_token_prefix = $base_table . '.' . $left_field;