mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2025-12-06 14:31:35 +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'''
|
||||
|
||||
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:
|
||||
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:
|
||||
persons += get_members_of_group(group, ldap_args)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user