Stephen Ficklin 4 anni fa
parent
commit
120fa5b96c

+ 6 - 3
tripal_ws/includes/TripalWebService/TripalContentService_v0_1.inc

@@ -520,6 +520,9 @@ class TripalContentService_v0_1 extends TripalWebService {
           // Index number (0, 1, 2...) of a hydra:member array.
           $temp[$k] = $this->sanitizeFieldKeys($resource, $v, $bundle, $service_path);
         }
+        elseif ($k == 'entity') {
+          $temp[$k] = $v;
+        }
         else {
           // TODO: this is an error, if we get here then we have
           // a key that isn't using the proper format... what to do?
@@ -879,13 +882,13 @@ class TripalContentService_v0_1 extends TripalWebService {
 
     // Get the TripalBundle, TripalTerm and TripalVocab type for this type.
     $bundle = tripal_load_bundle_entity(['label' => $ctype]);
-    
+
     // Check that the user has access to this bundle.  If not then the
     // function call will throw an error.
     if (!user_access('view ' . $bundle->name)) {
       throw new Exception("Permission Denied.");
     }
-        
+
     $term = entity_load('TripalTerm', ['id' => $bundle->term_id]);
     $term = reset($term);
 
@@ -1058,7 +1061,7 @@ class TripalContentService_v0_1 extends TripalWebService {
         // Show only content types users have access to and skip the rest.
         continue;
       }
-      
+
       $entity = entity_load('TripalTerm', ['id' => $bundle->term_id]);
       $term = reset($entity);
       $vocab = $term->vocab;