From cab3d377a3daec3ae7ce43d12e2dc944f69a83c1 Mon Sep 17 00:00:00 2001
From: that0n3guy <that0n3guy@46440.no-reply.drupal.org>
Date: Sat, 23 Mar 2013 21:59:20 -0400
Subject: [PATCH] added patch from 1950686 #1

---
 plugins/services_entity_resource_clean.inc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/services_entity_resource_clean.inc b/plugins/services_entity_resource_clean.inc
index 1e34c53..20acf06 100644
--- a/plugins/services_entity_resource_clean.inc
+++ b/plugins/services_entity_resource_clean.inc
@@ -175,7 +175,8 @@ class ServicesEntityResourceControllerClean extends ServicesEntityResourceContro
   protected function transform_values($entity_type, $property_info, $values) {
     // Default the bundle to the entity_type. This allows eck types that don't use custom bundles to not have to specify the bundle.
     $entity_info = entity_get_info($entity_type);
-    if (isset($entity_info['bundle keys'])) {
+    if (isset($entity_info['bundle keys'])
+      && (count($entity_info['bundles']) == 1 && key(reset($entity_info['bundles'])) == $entity_type)) {
       foreach ($entity_info['bundle keys'] as $bundle_key) {
         if (!array_key_exists($bundle_key, $values)) {
           $values[$bundle_key] = $entity_type;
@@ -196,4 +197,4 @@ class ServicesEntityResourceControllerClean extends ServicesEntityResourceContro
     }
     return $values;
   }  
-}
\ No newline at end of file
+}
-- 
1.7.9

