mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复创建用户 数据库报1062 Duplicate entry .. for key PRIMARY 错误 (#2934)
* [Bugfix] 修复创建用户 数据报1062 Duplicate entry .. for key PRIMARY 错误 * [Bugfix] 修改小问题pull/2942/head
parent
63a502ba62
commit
7bda48bd9f
|
@ -46,7 +46,6 @@ class AuthMixin:
|
|||
if self.can_update_password():
|
||||
self.date_password_last_updated = timezone.now()
|
||||
super().set_password(raw_password)
|
||||
self.save()
|
||||
else:
|
||||
error = _("User auth from {}, go there change password").format(
|
||||
self.source)
|
||||
|
@ -84,6 +83,7 @@ class AuthMixin:
|
|||
|
||||
def reset_password(self, new_password):
|
||||
self.set_password(new_password)
|
||||
self.save()
|
||||
|
||||
@property
|
||||
def date_password_expired(self):
|
||||
|
|
Loading…
Reference in New Issue