Skip to content

Commit

Permalink
Refactor condition to check for 'addusers' key only
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Feb 6, 2024
1 parent 54bd74e commit 4cfda42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imageroot/actions/get-configuration/20read
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ for key in agent.list_service_providers(rdb,'imap','tcp'):
mail = key['module_id']
get_retval = agent.tasks.run(f"module/{mail}",'list-domains')
for kd in get_retval['output']:
if 'addusers' in kd and kd.get('addusers') == True:
if kd.get('addusers') == True:
obj = {
"name": key['module_id'],
"label": f"{kd['domain']} ({key['mail_hostname']})",
Expand Down

0 comments on commit 4cfda42

Please sign in to comment.