def get_comment(comment_id): try: comment = Comment.get(comment_id) except StatementError: raise CommentNotFoundException() if comment is None: raise CommentNotFoundException() return comment
def get_comment_raw(comment_id): """ Return comment matching give id as an active record. """ try: comment = Comment.get(comment_id) except StatementError: raise CommentNotFoundException() if comment is None: raise CommentNotFoundException() return comment