Change the way the tenant dict is updated with Keystone information on the add_tenant... 37/2537/1
authorasteroide <thomas.duval@orange.com>
Wed, 14 Oct 2015 19:24:57 +0000 (21:24 +0200)
committerasteroide <thomas.duval@orange.com>
Wed, 14 Oct 2015 19:24:57 +0000 (21:24 +0200)
Change-Id: Ifa164a51b0195f546b97267ffca677bbf3a18eca

keystone-moon/keystone/contrib/moon/core.py

index f1bba65..bca90ad 100644 (file)
@@ -411,7 +411,9 @@ class TenantManager(manager.Manager):
         if 'id' not in tenant_dict:
             tenant_dict['id'] = None
         keystone_tenant = self.__get_keystone_tenant_dict(tenant_dict['id'], tenant_dict['name'])
-        tenant_dict.update(keystone_tenant)
+        for att in keystone_tenant:
+            if keystone_tenant[att]:
+                tenant_dict[att] = keystone_tenant[att]
         # Sync users between intra_authz_extension and intra_admin_extension
         self.moonlog_api.debug("add_tenant_dict {}".format(tenant_dict))
         if 'intra_admin_extension_id' in tenant_dict and tenant_dict['intra_admin_extension_id']: