Skip to content

Commit b3b59c2

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "user create v2.0 depends on tenantId in response"
2 parents 043572b + e2ebeb7 commit b3b59c2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • openstackclient/identity/v2_0

‎openstackclient/identity/v2_0/user.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ def take_action(self, parsed_args):
9999
# NOTE(dtroyer): The users.create() method wants 'tenant_id' but
100100
# the returned resource has 'tenantId'. Sigh.
101101
# We're using project_id now inside OSC so there.
102-
user._info.update(
103-
{'project_id': user._info.pop('tenantId')}
104-
)
102+
if 'tenantId' in user._info:
103+
user._info.update(
104+
{'project_id': user._info.pop('tenantId')}
105+
)
105106

106107
info = {}
107108
info.update(user._info)

0 commit comments

Comments
 (0)