Fixed permanent referenced before assignment condition

selenium-screenshot-testing
takeshix 2015-01-02 00:53:10 +01:00
parent 18c0afdd05
commit 65891ed215
1 changed files with 2 additions and 5 deletions

View File

@ -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