diff --git a/files/classes/comment.py b/files/classes/comment.py index 85c12c903..d6afa641f 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -469,7 +469,7 @@ class Comment(Base): player_hand = split_result[0].replace('X', '10') dealer_hand = split_result[1].split('/')[0] if blackjack_status == 'active' else split_result[1] dealer_hand = dealer_hand.replace('X', '10') - wager = split_result[4] + wager = int(split_result[4]) try: kind = split_result[5] except: kind = "coins" currency_kind = "Coins" if kind == "coins" else "Marseybucks" diff --git a/files/routes/posts.py b/files/routes/posts.py index 3ff56bcd9..82c9a5af3 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -89,6 +89,8 @@ def toggle_club(pid, v): @auth_required def publish(pid, v): post = get_post(pid) + if not post.private: return {"message": "Post published!"} + if post.author_id != v.id: abort(403) post.private = False post.created_utc = int(time.time())