Commit 7bda48bd authored by 八千流's avatar 八千流 Committed by 老广

[Bugfix] 修复创建用户 数据库报1062 Duplicate entry .. for key PRIMARY 错误 (#2934)

* [Bugfix] 修复创建用户 数据报1062 Duplicate entry .. for key PRIMARY 错误

* [Bugfix] 修改小问题
parent 63a502ba
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment