diff options
Diffstat (limited to 'app/services/projects/prometheus/alerts/notify_service.rb')
-rw-r--r-- | app/services/projects/prometheus/alerts/notify_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/projects/prometheus/alerts/notify_service.rb b/app/services/projects/prometheus/alerts/notify_service.rb index f1c093c89b7..22a882c4648 100644 --- a/app/services/projects/prometheus/alerts/notify_service.rb +++ b/app/services/projects/prometheus/alerts/notify_service.rb @@ -89,7 +89,9 @@ module Projects # AlertManagement::HttpIntegrations is complete, # we should use use the HttpIntegration as SSOT. # Remove with https://gitlab.com/gitlab-org/gitlab/-/issues/409734 - return false if project.alert_management_http_integrations.legacy.prometheus.any? + return false if project.alert_management_http_integrations + .for_endpoint_identifier('legacy-prometheus') + .any? prometheus = project.find_or_initialize_integration('prometheus') return false unless prometheus.manual_configuration? |