diff --git a/drama/routes/comments.py b/drama/routes/comments.py index 70cf7c03bb..b858c6bf0f 100644 --- a/drama/routes/comments.py +++ b/drama/routes/comments.py @@ -139,7 +139,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None): elif sort == "old": output = comms.order_by(Comment.created_utc.asc()).all() elif sort == "controversial": - output = sorted(comms.all(), key=lambda x: x[0].score_disputed, reverse=True) + output = sorted(comms.all(), key=lambda x: x.score_disputed, reverse=True) elif sort == "random": c = comms.all() output = random.sample(c, k=len(c))