mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2025-12-08 07:21:36 +01:00
fix: fallback on empty owners/groups
This commit is contained in:
@@ -105,10 +105,11 @@ def select_targets(users, groups, ldap_args, admin_group="pki"):
|
|||||||
'''Returns a list of persons to send notifications to'''
|
'''Returns a list of persons to send notifications to'''
|
||||||
|
|
||||||
persons = []
|
persons = []
|
||||||
if users:
|
# FIXME better handling of empty owner/groups
|
||||||
|
if users and not any([ not s for s in users]):
|
||||||
for username in users:
|
for username in users:
|
||||||
persons.append(get_user_by_uid(username, ldap_args))
|
persons.append(get_user_by_uid(username, ldap_args))
|
||||||
elif groups:
|
elif groups and not any([ not s for s in groups ]):
|
||||||
for group in groups:
|
for group in groups:
|
||||||
persons += get_members_of_group(group, ldap_args)
|
persons += get_members_of_group(group, ldap_args)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user