浏览代码

Fixed bug in setting entities on new collection. The full entity was being added but only the id was needed. It was breaking the file creation.

Stephen Ficklin 6 年之前
父节点
当前提交
250afb6968
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      tripal/views_handlers/tripal_views_handler_area_collections.inc

+ 3 - 2
tripal/views_handlers/tripal_views_handler_area_collections.inc

@@ -285,6 +285,7 @@ function tripal_views_handler_area_collections_form_submit($form, $form_state) {
   foreach ($results['TripalEntity'] as $entity) {
     $entities[] = $entity->id;
   }
+
   $collection = tripal_create_collection(array(
     'uid'  => $uid,
     'collection_name' => $collection_name,
@@ -428,7 +429,7 @@ function tripal_views_handler_area_collections_search_api_form_submit($form, $fo
         'fields' => array(),
       );
     }
-    $entities[$bundle]['ids'][] = $r->entity;
+    $entities[$bundle]['ids'][] = $r->entity->id;
   }
 
   // Now add the entities to the collection based on bundle.
@@ -450,4 +451,4 @@ function tripal_views_handler_area_collections_search_api_form_submit($form, $fo
       '!view' => l('data collections page', 'user/' . $user->uid . '/data-collections'),
     ))
   );
-}
+}