views.py 文件源码

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

项目:sentry-plugins 作者: getsentry 项目源码 文件源码
def save_changes(self):
        new_projects = []
        removed_projects = []

        for project_id, project in six.iteritems(self.projects_by_id):
            if project_id in self.cleaned_data['projects']:
                if enable_plugin_for_tenant(project, self.tenant):
                    new_projects.append(project)
            else:
                if disable_plugin_for_tenant(project, self.tenant):
                    removed_projects.append(project)

        if new_projects or removed_projects:
            with Context.for_tenant(self.tenant) as ctx:
                ctx.send_notification(
                    **make_subscription_update_notification(new_projects, removed_projects)
                )
                if removed_projects:
                    mentions.clear_project_mentions(self.tenant, removed_projects)
                ctx.push_recent_events_glance()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号