Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Lesson-3/12_Edit-Menu-Form/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def editMenuItem(restaurant_id, menu_id):
if request.method == 'POST':
if request.form['name']:
editedItem.name = request.form['name']
session.add(editedItem)
session.commit()
return redirect(url_for('restaurantMenu', restaurant_id=restaurant_id))
session.add(editedItem)
session.commit()
return redirect(url_for('restaurantMenu', restaurant_id=restaurant_id))
else:
# USE THE RENDER_TEMPLATE FUNCTION BELOW TO SEE THE VARIABLES YOU
# SHOULD USE IN YOUR EDITMENUITEM TEMPLATE
Expand Down