Skip to content

Commit c87fb66

Browse files
committed
make sure datasource is in same org.
1 parent 7118575 commit c87fb66

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/sentry/monitors/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ def get_detector_for_monitor(monitor: Monitor) -> Detector | None:
419419
return Detector.objects.get(
420420
datasource__type=DATA_SOURCE_CRON_MONITOR,
421421
datasource__source_id=str(monitor.id),
422+
datasource__organization_id=monitor.organization_id,
422423
)
423424
except Detector.DoesNotExist:
424425
return None

0 commit comments

Comments
 (0)