Skip to content

Commit 78220b8

Browse files
authored
perf(aci): Remove Organization load from Seer anomaly fetching (#95570)
A minor win at best, but trivial so why not.
1 parent 909c985 commit 78220b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sentry/seer/anomaly_detection/get_anomaly_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_anomaly_data_from_seer_legacy(
4242
snuba_query = alert_rule.snuba_query
4343
extra_data = {
4444
"subscription_id": subscription.id,
45-
"organization_id": subscription.project.organization.id,
45+
"organization_id": subscription.project.organization_id,
4646
"project_id": subscription.project_id,
4747
"alert_rule_id": alert_rule.id,
4848
"threshold_type": alert_rule.threshold_type,
@@ -180,7 +180,7 @@ def get_anomaly_data_from_seer(
180180

181181
extra_data = {
182182
"subscription_id": subscription.id,
183-
"organization_id": subscription.project.organization.id,
183+
"organization_id": subscription.project.organization_id,
184184
"project_id": subscription.project_id,
185185
"source_id": source_id,
186186
"source_type": source_type,
@@ -201,7 +201,7 @@ def get_anomaly_data_from_seer(
201201
cur_window=TimeSeriesPoint(timestamp=timestamp.timestamp(), value=aggregation_value),
202202
)
203203
detect_anomalies_request = DetectAnomaliesRequest(
204-
organization_id=subscription.project.organization.id,
204+
organization_id=subscription.project.organization_id,
205205
project_id=subscription.project_id,
206206
config=anomaly_detection_config,
207207
context=context,

0 commit comments

Comments
 (0)