mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
use dict comprehension in plugins, part 2 (#8822)
* use dict comprehension in plugins * add changelog frag
This commit is contained in:
parent
ecc048bc12
commit
7e978c77b4
21 changed files with 76 additions and 68 deletions
|
@ -847,8 +847,11 @@ def main():
|
|||
|
||||
# Keycloak API expects config parameters to be arrays containing a single string element
|
||||
if config is not None:
|
||||
module.params['config'] = dict((k, [str(v).lower() if not isinstance(v, str) else v])
|
||||
for k, v in config.items() if config[k] is not None)
|
||||
module.params['config'] = {
|
||||
k: [str(v).lower() if not isinstance(v, str) else v]
|
||||
for k, v in config.items()
|
||||
if config[k] is not None
|
||||
}
|
||||
|
||||
if mappers is not None:
|
||||
for mapper in mappers:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue