mirror of https://github.com/jumpserver/jumpserver
fix: 修复 LDAP 导入用户时指定其他组织,还会导入到 Default 组织的问题
parent
afc7232bd9
commit
339d872d37
|
@ -1,9 +1,9 @@
|
|||
# coding: utf-8
|
||||
#
|
||||
#
|
||||
from celery import shared_task
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from django.db import transaction
|
||||
from common.utils import get_logger
|
||||
from ops.celery.decorator import after_app_ready_start
|
||||
from ops.celery.utils import (
|
||||
|
@ -22,6 +22,7 @@ def sync_ldap_user():
|
|||
|
||||
|
||||
@shared_task(verbose_name=_('Import ldap user'))
|
||||
@transaction.atomic
|
||||
def import_ldap_user():
|
||||
logger.info("Start import ldap user task")
|
||||
util_server = LDAPServerUtil()
|
||||
|
|
Loading…
Reference in New Issue