[odrs-web] Show the correct page on database failure
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web] Show the correct page on database failure
- Date: Tue, 27 Sep 2016 11:30:52 +0000 (UTC)
commit 57e107c56369479cf30ba4be9c0ed1e2c2f5b5ce
Author: Richard Hughes <richard hughsie com>
Date: Mon Sep 26 14:16:32 2016 +0100
Show the correct page on database failure
flaskapp.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/flaskapp.py b/flaskapp.py
index 9875626..89fd29e 100755
--- a/flaskapp.py
+++ b/flaskapp.py
@@ -43,7 +43,8 @@ def login():
user = db.user_get_with_login(request.form['username'],
request.form['password'])
except CursorError as e:
- return json_error(str(e))
+ flash(str(e))
+ return render_template('error.html'), 503
if not user:
flash('Credentials are not valid.')
return redirect(url_for('.login'))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]