From c76a73daddf1ddffc73af9c90780d2736e3de60f Mon Sep 17 00:00:00 2001 From: Sattam Alharbi Date: Sun, 4 Jun 2017 18:18:51 +0300 Subject: [PATCH] fix editRestaurant by adding session add/commit lines --- Lesson-4/Final-Project/finalproject.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lesson-4/Final-Project/finalproject.py b/Lesson-4/Final-Project/finalproject.py index 38de5ac..bb906de 100644 --- a/Lesson-4/Final-Project/finalproject.py +++ b/Lesson-4/Final-Project/finalproject.py @@ -75,6 +75,8 @@ def editRestaurant(restaurant_id): if request.method == 'POST': if request.form['name']: editedRestaurant.name = request.form['name'] + session.add(editedRestaurant) + session.commit() return redirect(url_for('showRestaurants')) else: return render_template(