浏览代码

Fixed bug in generate_vars function that kept FK fields from expanding if a form FK field was null

spficklin 12 年之前
父节点
当前提交
a5ec42d068
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tripal_core/api/tripal_core.api.inc

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

@@ -1555,7 +1555,7 @@ function tripal_core_generate_chado_var($table, $values, $base_options = array()
             // the table referenced by the foreign key
             // the table referenced by the foreign key
             //Dont do anything if the foreign key is empty
             //Dont do anything if the foreign key is empty
             if (empty($object->{$foreign_key})) {
             if (empty($object->{$foreign_key})) {
-              break;
+              continue;
             }
             }
             // get the record from the foreign table
             // get the record from the foreign table
             $foreign_values = array($primary_key => $object->{$foreign_key});
             $foreign_values = array($primary_key => $object->{$foreign_key});