mirror of https://github.com/JohnHammond/CTFd.git
Fixed permanent referenced before assignment condition
parent
18c0afdd05
commit
65891ed215
|
@ -118,10 +118,6 @@ def init_views(app):
|
||||||
|
|
||||||
name = request.form.get('name')
|
name = request.form.get('name')
|
||||||
email = request.form.get('email')
|
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')
|
website = request.form.get('website')
|
||||||
affiliation = request.form.get('affiliation')
|
affiliation = request.form.get('affiliation')
|
||||||
country = request.form.get('country')
|
country = request.form.get('country')
|
||||||
|
@ -149,7 +145,8 @@ def init_views(app):
|
||||||
team = Teams.query.filter_by(id=session['id']).first()
|
team = Teams.query.filter_by(id=session['id']).first()
|
||||||
team.name = name
|
team.name = name
|
||||||
team.email = email
|
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.website = website
|
||||||
team.affiliation = affiliation
|
team.affiliation = affiliation
|
||||||
team.country = country
|
team.country = country
|
||||||
|
|
Loading…
Reference in New Issue