summaryrefslogtreecommitdiffstats
path: root/roles/lib_zabbix
diff options
context:
space:
mode:
Diffstat (limited to 'roles/lib_zabbix')
-rw-r--r--roles/lib_zabbix/library/zbx_action.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/roles/lib_zabbix/library/zbx_action.py b/roles/lib_zabbix/library/zbx_action.py
index 2f9524556..c388a65cc 100644
--- a/roles/lib_zabbix/library/zbx_action.py
+++ b/roles/lib_zabbix/library/zbx_action.py
@@ -228,12 +228,12 @@ def get_user_groups(zapi, groups):
'''get the mediatype id from the mediatype name'''
user_groups = []
- content = zapi.get_content('usergroup',
- 'get',
- {'search': {'name': groups}})
-
- for usr_grp in content['result']:
- user_groups.append({'usrgrpid': usr_grp['usrgrpid']})
+ for group in groups:
+ content = zapi.get_content('usergroup',
+ 'get',
+ {'search': {'name': group}})
+ for result in content['result']:
+ user_groups.append({'usrgrpid': result['usrgrpid']})
return user_groups