summaryrefslogtreecommitdiffstats
path: root/accounts/views/admin/__init__.py
diff options
context:
space:
mode:
authorJonah BrĂ¼chert <jbb@kaidan.im>2024-03-29 02:13:57 +0100
committerJonah BrĂ¼chert <jbb@kaidan.im>2024-03-29 02:14:22 +0100
commitdcad1d5ca832ea05ababa3d38de9a82fc361f2ba (patch)
tree738e06987788744c9071020844ac8c7896db2d6d /accounts/views/admin/__init__.py
parent41551f9ff74c692b3db7818364a9b0966e5a08be (diff)
downloadweb-dcad1d5ca832ea05ababa3d38de9a82fc361f2ba.tar.gz
web-dcad1d5ca832ea05ababa3d38de9a82fc361f2ba.tar.bz2
web-dcad1d5ca832ea05ababa3d38de9a82fc361f2ba.zip
Enforce types in variables
Diffstat (limited to 'accounts/views/admin/__init__.py')
-rw-r--r--accounts/views/admin/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/accounts/views/admin/__init__.py b/accounts/views/admin/__init__.py
index 7378e38..938033b 100644
--- a/accounts/views/admin/__init__.py
+++ b/accounts/views/admin/__init__.py
@@ -66,7 +66,7 @@ def disable_account():
if 'uid' in request.args:
form = AdminDisableAccountForm(username=request.args['uid'])
- if form.validate_on_submit():
+ if form.validate_on_submit() and form.user:
random_pw = str(uuid4())
form.user.change_password(random_pw)
for service in accounts_app.all_services: