mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复小错误
parent
4c8eb4a94b
commit
dbc471c195
|
@ -98,7 +98,7 @@ class JMSInventory(BaseInventory):
|
||||||
if gateway.private_key:
|
if gateway.private_key:
|
||||||
proxy_command_list.append("-i {}".format(gateway.private_key_file))
|
proxy_command_list.append("-i {}".format(gateway.private_key_file))
|
||||||
|
|
||||||
proxy_command = "'-o ProxyCommand={}".format(
|
proxy_command = "'-o ProxyCommand={}'".format(
|
||||||
" ".join(proxy_command_list)
|
" ".join(proxy_command_list)
|
||||||
)
|
)
|
||||||
return {"ansible_ssh_common_args": proxy_command}
|
return {"ansible_ssh_common_args": proxy_command}
|
||||||
|
|
|
@ -109,14 +109,15 @@ 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:
|
if not password:
|
||||||
is_ok = check_password_rules(password)
|
return super().form_valid(form)
|
||||||
if not is_ok:
|
|
||||||
form.add_error(
|
|
||||||
"password", _("* Your password does not meet the requirements")
|
|
||||||
)
|
|
||||||
return self.form_invalid(form)
|
|
||||||
|
|
||||||
|
is_ok = check_password_rules(password)
|
||||||
|
if not is_ok:
|
||||||
|
form.add_error(
|
||||||
|
"password", _("* Your password does not meet the requirements")
|
||||||
|
)
|
||||||
|
return self.form_invalid(form)
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue