account_deleter.py 文件源码

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

项目:fantasy-dota-heroes 作者: ThePianoDentist 项目源码 文件源码
def main():
    """
    Dont want to delete account as soon as indicated. makes battlecupos and stuff awkward.
    so delete it at the end of the day.
    :return:
    """
    session = make_session()
    with transaction.manager:
        delete_accounts = session.query(User.username).filter(User.to_delete == True).all()
        for username in delete_accounts:
            username = username[0]
            # loop over leagues and delete from them
            #session.query(TeamHero).filter(TeamHero.user == username).delete()
            # any others?
            session.query()
        delete(delete_accounts)
        transaction.commit()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号