diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2019-05-11 22:34:51 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2019-05-11 22:34:51 +0200 |
commit | 75b8f2230065ccedcc602b054305d08d0e450b8b (patch) | |
tree | 5563a09c69da096a4d19083637589af84a8b7068 /src/web/views | |
parent | Updated README. (diff) | |
parent | fix: edition of user's password was broken (diff) | |
download | newspipe-75b8f2230065ccedcc602b054305d08d0e450b8b.tar.gz newspipe-75b8f2230065ccedcc602b054305d08d0e450b8b.tar.bz2 newspipe-75b8f2230065ccedcc602b054305d08d0e450b8b.zip |
Merge branch 'master' of gitlab.com:newspipe/newspipe
Diffstat (limited to 'src/web/views')
-rw-r--r-- | src/web/views/admin.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/web/views/admin.py b/src/web/views/admin.py index 2e97ff36..73b2b668 100644 --- a/src/web/views/admin.py +++ b/src/web/views/admin.py @@ -2,7 +2,6 @@ from datetime import datetime from flask import (Blueprint, render_template, redirect, flash, url_for) from flask_babel import gettext, format_timedelta from flask_login import login_required, current_user -from werkzeug import generate_password_hash from lib.utils import redirect_url from web.views.common import admin_permission @@ -61,7 +60,7 @@ def process_user_form(user_id=None): # Edit a user user_contr.update({'id': user_id}, {'nickname': form.nickname.data, - 'pwdhash': generate_password_hash(form.password.data), + 'password': form.password.data, 'automatic_crawling': form.automatic_crawling.data}) user = user_contr.get(id=user_id) flash(gettext('User %(nick)s successfully updated', @@ -69,7 +68,7 @@ def process_user_form(user_id=None): else: # Create a new user (by the admin) user = user_contr.create(nickname=form.nickname.data, - pwdhash=generate_password_hash(form.password.data), + password=form.password.data, automatic_crawling=form.automatic_crawling.data, is_admin=False, is_active=True) |