mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 更新用户信息时不填密码也会触发密码规则验证,导致无法更新
parent
5464ac8167
commit
f4084c800a
|
@ -109,6 +109,7 @@ class UserUpdateView(AdminUserRequiredMixin, SuccessMessageMixin, UpdateView):
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
password = form.cleaned_data.get('password')
|
password = form.cleaned_data.get('password')
|
||||||
|
if password:
|
||||||
is_ok = check_password_rules(password)
|
is_ok = check_password_rules(password)
|
||||||
if not is_ok:
|
if not is_ok:
|
||||||
form.add_error(
|
form.add_error(
|
||||||
|
|
Loading…
Reference in New Issue