diff --git a/pyproject.toml b/pyproject.toml index 2a69b63ef81d8f..096958c04dd132 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -549,7 +549,6 @@ module = [ "sentry.net.http", "sentry.net.socket", "sentry.notifications.additional_attachment_manager", - "sentry.notifications.notificationcontroller", "sentry.notifications.notifications.activity.base", "sentry.notifications.notifications.activity.new_processing_issues", "sentry.notifications.notifications.activity.release", diff --git a/src/sentry/api/serializers/models/project.py b/src/sentry/api/serializers/models/project.py index d089edce4e531c..d8b9c8e7c9dcd9 100644 --- a/src/sentry/api/serializers/models/project.py +++ b/src/sentry/api/serializers/models/project.py @@ -59,12 +59,7 @@ should_use_notifications_v2, transform_to_notification_settings_by_scope, ) -from sentry.notifications.notificationcontroller import NotificationController -from sentry.notifications.types import ( - NotificationSettingEnum, - NotificationSettingOptionValues, - NotificationSettingTypes, -) +from sentry.notifications.types import NotificationSettingOptionValues, NotificationSettingTypes from sentry.roles import organization_roles from sentry.services.hybrid_cloud.actor import RpcActor from sentry.services.hybrid_cloud.notifications import notifications_service @@ -319,13 +314,8 @@ def measure_span(op_tag): ) if use_notifications_v2: - controller = NotificationController( - recipients=[user], - project_ids=project_ids, - type=NotificationSettingEnum.ISSUE_ALERTS, - ) - subscriptions = controller.get_subscriptions_status_for_projects( - user_id=user.id, + subscriptions = notifications_service.get_subscriptions_for_projects( + user=user.id, project_ids=project_ids, type=NotificationSettingTypes.ISSUE_ALERTS, )