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