mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
Merge pull request #4 from takeshixx/dev
Fixed permanent "referenced before assignment" condition
This commit is contained in:
@@ -118,10 +118,6 @@ def init_views(app):
|
||||
|
||||
name = request.form.get('name')
|
||||
email = request.form.get('email')
|
||||
|
||||
if 'password' in request.form.keys() and not len(request.form['password']) == 0:
|
||||
password = request.form.get('password')
|
||||
|
||||
website = request.form.get('website')
|
||||
affiliation = request.form.get('affiliation')
|
||||
country = request.form.get('country')
|
||||
@@ -149,7 +145,8 @@ def init_views(app):
|
||||
team = Teams.query.filter_by(id=session['id']).first()
|
||||
team.name = name
|
||||
team.email = email
|
||||
team.password = bcrypt_sha256.encrypt(password)
|
||||
if 'password' in request.form.keys() and not len(request.form['password']) == 0:
|
||||
team.password = bcrypt_sha256.encrypt(request.form.get('password'))
|
||||
team.website = website
|
||||
team.affiliation = affiliation
|
||||
team.country = country
|
||||
|
||||
Reference in New Issue
Block a user