Quellcode durchsuchen

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 vor 6 Jahren
Ursprung
Commit
250afb6968
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  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'),
     ))
   );
-}
+}