Skip to content

Commit 9ddec35

Browse files
committed
oop move that lower
1 parent cc7c9a1 commit 9ddec35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sentry/incidents/subscription_processor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ def process_update(self, subscription_update: QuerySubscriptionUpdate) -> None:
260260
This is the core processing method utilized when Query Subscription Consumer fetches updates from kafka
261261
"""
262262
dataset = self.subscription.snuba_query.dataset
263-
organization = self.subscription.project.organization
264263
try:
265264
# Check that the project exists
266265
self.subscription.project
@@ -270,6 +269,9 @@ def process_update(self, subscription_update: QuerySubscriptionUpdate) -> None:
270269
if self.subscription.project.status != ObjectStatus.ACTIVE:
271270
metrics.incr("incidents.alert_rules.ignore_deleted_project")
272271
return
272+
273+
organization = self.subscription.project.organization
274+
273275
if dataset == "events" and not features.has("organizations:incidents", organization):
274276
# They have downgraded since these subscriptions have been created. So we just ignore updates for now.
275277
metrics.incr("incidents.alert_rules.ignore_update_missing_incidents")

0 commit comments

Comments
 (0)