more Pythonic formulation for boolean check on list
This commit is contained in:
parent
7cfb805971
commit
66c26e77cd
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ class MemberRegistrationManager(object):
|
||||||
(self.default_principalfolder,))[0]
|
(self.default_principalfolder,))[0]
|
||||||
self.createPrincipal(pfName, userId, password, lastName, firstName,
|
self.createPrincipal(pfName, userId, password, lastName, firstName,
|
||||||
useExisting=useExisting)
|
useExisting=useExisting)
|
||||||
if len(groups)==0:
|
if not groups:
|
||||||
groups = options(self.groups_key, ())
|
groups = options(self.groups_key, ())
|
||||||
self.setGroupsForPrincipal(pfName, userId, groups=groups)
|
self.setGroupsForPrincipal(pfName, userId, groups=groups)
|
||||||
return self.createPersonForPrincipal(pfName, userId, lastName, firstName,
|
return self.createPersonForPrincipal(pfName, userId, lastName, firstName,
|
||||||
|
|
Loading…
Add table
Reference in a new issue