voting.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:dbas 作者: hhucn 项目源码 文件源码
def add_seen_statement(statement_uid, db_user):
    """
    Adds the uid of the statement into the seen_by list, mapped with the given user uid

    :param db_user:current user
    :param statement_uid: uid of the statement
    :return: undefined
    """
    if not is_integer(statement_uid) or not isinstance(db_user, User):
        return False
    logger('VotingHelper', 'add_seen_statement', 'statement ' + str(statement_uid) + ', for user ' + str(db_user.uid))

    val = __statement_seen_by_user(db_user, statement_uid)
    if val:
        transaction.commit()

    return val
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号