Use dictionary literal for dictionary creation
Dictionary creation could be rewritten as a dictionary literal. for example: token_values = {} token_values['user_id'] = access.get('user', {}).get('id') could be rewritten as token_values = {'user_id': access.get('user', {}).get('id')} TrivialFix Change-Id: I0c5677b527d440b8faded31bf4d9d62805391ae3
This commit is contained in:
parent
8cf0b8fe58
commit
105ad0b080
|
@ -232,9 +232,9 @@ def build_token_values_v2(access, default_domain_id):
|
|||
'expires_at': timeutils.normalize_time(
|
||||
timeutils.parse_isotime(token_data['expires'])),
|
||||
'issued_at': timeutils.normalize_time(
|
||||
timeutils.parse_isotime(token_data['issued_at']))}
|
||||
|
||||
token_values['user_id'] = access.get('user', {}).get('id')
|
||||
timeutils.parse_isotime(token_data['issued_at'])),
|
||||
'user_id': access.get('user', {}).get('id')
|
||||
}
|
||||
|
||||
project = token_data.get('tenant')
|
||||
if project is not None:
|
||||
|
|
Loading…
Reference in New Issue