Skip to content

Commit 2156c32

Browse files
committed
has_incidents
1 parent 9cda607 commit 2156c32

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/sentry/incidents/utils/subscription_limits.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,15 @@ def is_metric_subscription_allowed(dataset: str, organization: Organization) ->
1515
Returns True if allowed, False if the organization lacks the required features
1616
(e.g. after a plan downgrade).
1717
"""
18+
has_incidents = features.has("organizations:incidents", organization)
1819
if dataset == Dataset.Events.value:
19-
return features.has("organizations:incidents", organization)
20+
return has_incidents
2021

2122
if dataset == Dataset.Transactions.value:
22-
return features.has("organizations:incidents", organization) and features.has(
23-
"organizations:performance-view", organization
24-
)
23+
return has_incidents and features.has("organizations:performance-view", organization)
2524

2625
if dataset == Dataset.EventsAnalyticsPlatform.value:
27-
return features.has("organizations:incidents", organization) and features.has(
28-
"organizations:visibility-explore-view", organization
29-
)
26+
return has_incidents and features.has("organizations:visibility-explore-view", organization)
3027

3128
if dataset == Dataset.PerformanceMetrics.value:
3229
return features.has("organizations:on-demand-metrics-extraction", organization)

0 commit comments

Comments
 (0)