fixed test on mail
This commit is contained in:
@@ -29,9 +29,10 @@ def index():
|
|||||||
|
|
||||||
@app.route('/showSummary',methods=['POST'])
|
@app.route('/showSummary',methods=['POST'])
|
||||||
def showSummary():
|
def showSummary():
|
||||||
club = [club for club in clubs if club['email'] == request.form['email']]
|
try:
|
||||||
if club:
|
club = [club for club in clubs if club['email'] == request.form['email']][0]
|
||||||
return render_template('welcome.html', club=club[0], competitions=competitions, now=now)
|
return render_template('welcome.html', club=club, competitions=competitions)
|
||||||
|
except IndexError:
|
||||||
flash("Sorry, that email wasn't found")
|
flash("Sorry, that email wasn't found")
|
||||||
return redirect(url_for('index'))
|
return redirect(url_for('index'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user