Commit 76c41055 authored by Willard's avatar Willard

Fix error where create stall review expects form

parent e6130890
...@@ -226,9 +226,9 @@ def stall_favorite_post(stall_id): ...@@ -226,9 +226,9 @@ def stall_favorite_post(stall_id):
@auth.login_required @auth.login_required
def create_stall_review(stall_id): def create_stall_review(stall_id):
user_id = g.user.id user_id = g.user.id
title = request.form['title'] title = request.json['title']
body = request.form['body'] body = request.json['body']
rating = float(request.form['rating']) rating = float(request.json['rating'])
review = StallReview(title, body, rating, user_id, stall_id) review = StallReview(title, body, rating, user_id, stall_id)
db.session.add(review) db.session.add(review)
db.session.commit() db.session.commit()
......
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