From b2836b9f4f6f4f9f557d6b05c0a42a3699b5ceca Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Wed, 25 Sep 2019 12:34:12 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8D=20LDAP=20?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AF=BC=E5=85=A5=E4=BC=9A=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=88=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=EF=BC=9AAD=20=E7=94=A8=E6=88=B7=E5=9C=A8=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=20OU=20=E4=B8=8B=E9=9D=A2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/settings/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/settings/utils.py b/apps/settings/utils.py index 232224dcc..f9fa7ba96 100644 --- a/apps/settings/utils.py +++ b/apps/settings/utils.py @@ -93,6 +93,8 @@ class LDAPUtil: user_item = self._ldap_entry_to_user_item(entry) user = self.get_user_by_username(user_item['username']) user_item['existing'] = bool(user) + if user_item in user_items: + continue user_items.append(user_item) return user_items