Commit 1fc01f79 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'ck3g-use-without_status-in-alert-not_resolved-scope' into 'master'

Use built-in without_status scope

See merge request gitlab-org/gitlab!44280
parents 7cca1f6e 0124567b
......@@ -126,7 +126,7 @@ module AlertManagement
scope :for_environment, -> (environment) { where(environment: environment) }
scope :search, -> (query) { fuzzy_search(query, [:title, :description, :monitoring_tool, :service]) }
scope :open, -> { with_status(OPEN_STATUSES) }
scope :not_resolved, -> { where.not(status: STATUSES[:resolved]) }
scope :not_resolved, -> { without_status(:resolved) }
scope :with_prometheus_alert, -> { includes(:prometheus_alert) }
scope :order_start_time, -> (sort_order) { order(started_at: sort_order) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment