Commit f52be04e authored by Willard's avatar Willard

More minor fixes

parent 7d6260a0
......@@ -149,7 +149,7 @@ def get_stall_favorites_count(stall_id):
stall = Stall.query.get(stall_id)
if(stall is None):
return 0
return len(stall.favorites)
return str(len(stall.favorites))
@app.route('/api/stalls/<int:stall_id>/dishes', methods=['GET'])
def get_dishes_by_stall(stall_id):
......@@ -173,7 +173,7 @@ def stall_favorite(stall_id):
if stall not in g.user.stall_favorites and favorited:
g.user.stall_favorites.append(stall)
elif stall in g.user.stall_favorites and not favorited:
g.stall.stall_favorites.remove(stall)
g.user.stall_favorites.remove(stall)
db.session.commit()
return str(stall in g.user.stall_favorites)
......
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