mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 11:03:54 +00:00
typing: Add assertions for authentication.
Signed-off-by: Zixuan James Li <359101898@qq.com>
This commit is contained in:
committed by
Tim Abbott
parent
c572d9be5a
commit
4c6f2ae7be
@@ -273,6 +273,7 @@ class LoggingSetPasswordForm(SetPasswordForm):
|
||||
return new_password
|
||||
|
||||
def save(self, commit: bool = True) -> UserProfile:
|
||||
assert isinstance(self.user, UserProfile)
|
||||
do_change_password(self.user, self.cleaned_data["new_password1"], commit=commit)
|
||||
return self.user
|
||||
|
||||
|
||||
Reference in New Issue
Block a user