mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Gracefully handle an empty members list
This can occur if you do something like: $ ipa hbac-add-host --hosts="" testrule options will have an entry for 'host' but it will be None whcih is not iterable. ticket 486
This commit is contained in:
committed by
Simo Sorce
parent
d824eee8fa
commit
97e9309db3
@@ -864,7 +864,10 @@ class LDAPModMember(LDAPQuery):
|
||||
for ldap_obj_name in self.obj.attribute_members[attr]:
|
||||
dns[attr][ldap_obj_name] = []
|
||||
failed[attr][ldap_obj_name] = []
|
||||
for name in options.get(to_cli(ldap_obj_name), []):
|
||||
names = options.get(to_cli(ldap_obj_name), [])
|
||||
if not names:
|
||||
continue
|
||||
for name in names:
|
||||
if not name:
|
||||
continue
|
||||
ldap_obj = self.api.Object[ldap_obj_name]
|
||||
|
||||
Reference in New Issue
Block a user