Commit fbc4c82f authored by Willard's avatar Willard

Change redirect of edit and new stall

parent daf16ac4
......@@ -29,7 +29,7 @@ def new_stall():
stall = Stall(form.name.data, form.description.data, current_user.id, form.location.data)
db.session.add(stall)
db.session.commit()
return redirect(url_for('stalls'))
return redirect(url_for('stall', stall_id=stall.id))
else:
flash_form_errors(form)
return redirect(url_for('new_stall'))
......@@ -50,7 +50,7 @@ def edit_stall(stall_id):
stall.description = form.description.data
stall.location_id = form.location.data
db.session.commit()
return redirect(url_for('stalls'))
return redirect(url_for('stall', stall_id=stall_id))
else:
flash_form_errors(form)
return redirect(url_for('edit_stall', values=[('stall_id', stall_id)]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment