From cf972942fab3351dfe9c7dd6eff86c932887b584 Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 3 Apr 2023 16:54:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20LDAP=20=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E7=94=A8=E6=88=B7=E6=97=B6=E6=8C=87=E5=AE=9A=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=BB=84=E7=BB=87=EF=BC=8C=E8=BF=98=E4=BC=9A=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=88=B0=20Default=20=E7=BB=84=E7=BB=87=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/users/tasks.py b/apps/users/tasks.py index ea6426aa4..90f987329 100644 --- a/apps/users/tasks.py +++ b/apps/users/tasks.py @@ -4,6 +4,7 @@ from celery import shared_task from django.conf import settings from django.utils import timezone +from django.db import transaction from users.notifications import PasswordExpirationReminderMsg from ops.celery.utils import ( @@ -80,6 +81,7 @@ def check_user_expired_periodic(): @shared_task +@transaction.atomic def import_ldap_user(): logger.info("Start import ldap user task") util_server = LDAPServerUtil()