feat: 修改LDAP导入组织问题 (#8111)

Signed-off-by: Jiangjie.Bai <bugatti_it@163.com>

Co-authored-by: BaiJiangJie <bugatti_it@163.com>
This commit is contained in:
fit2bot
2022-04-20 16:05:33 +08:00
committed by GitHub
parent f1bd4ea91f
commit d2dd487e2c
2 changed files with 11 additions and 3 deletions

View File

@@ -376,7 +376,9 @@ class LDAPImportUtil(object):
except Exception as e:
errors.append({user['username']: str(e)})
logger.error(e)
if org and org.is_root():
if not org:
return
if org.is_root():
return
for obj in objs:
org.add_member(obj)