client.py 文件源码

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

项目:borgcube 作者: enkore 项目源码 文件源码
def delete_view(self, request):
        client = self.parent.parent.client
        if request.method == 'POST':
            client.job_configs.remove(self.config)
            # Could just leave it there, but likely not the intention behind clicking (delete).
            for schedule in data_root().schedules:
                for action in list(schedule.actions):
                    if getattr(action, 'job_config', None) == self.config:
                        schedule.actions.remove(action)
            transaction.get().note('Deleted job config %s from client %s' % (self.config.oid, client.hostname))
            transaction.commit()
        return self.redirect_to()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号