From 866e5d2011b8c86bffda051174beac5815c7879d Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 22 Feb 2019 19:14:07 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9ldap=20test?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/serializers.py | 4 ++-- apps/ops/views/celery.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/common/serializers.py b/apps/common/serializers.py index 23ff9fb90..4c8e6d3b5 100644 --- a/apps/common/serializers.py +++ b/apps/common/serializers.py @@ -12,8 +12,8 @@ class MailTestSerializer(serializers.Serializer): class LDAPTestSerializer(serializers.Serializer): AUTH_LDAP_SERVER_URI = serializers.CharField(max_length=1024) - AUTH_LDAP_BIND_DN = serializers.CharField(max_length=1024) - AUTH_LDAP_BIND_PASSWORD = serializers.CharField() + AUTH_LDAP_BIND_DN = serializers.CharField(max_length=1024, required=False, allow_blank=True) + AUTH_LDAP_BIND_PASSWORD = serializers.CharField(required=False, allow_blank=True) AUTH_LDAP_SEARCH_OU = serializers.CharField() AUTH_LDAP_SEARCH_FILTER = serializers.CharField() AUTH_LDAP_USER_ATTR_MAP = serializers.CharField() diff --git a/apps/ops/views/celery.py b/apps/ops/views/celery.py index 09e925e90..e549f62c0 100644 --- a/apps/ops/views/celery.py +++ b/apps/ops/views/celery.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- # -from django.views.generic import DetailView, TemplateView +from django.views.generic import TemplateView from common.permissions import AdminUserRequiredMixin -from ..models import CeleryTask __all__ = ['CeleryTaskLogView']