diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 00:09:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 00:09:51 +0000 |
commit | 71da67f3262eeffe59cc228986e0a2bb97b6dba5 (patch) | |
tree | 426845fe569787b0ab1b2bae573fb1ae8ccb6fe1 /app/models/project.rb | |
parent | f2dfd9ee819afb07bf11bd36a5f9d23009be0d39 (diff) | |
download | gitlab-ce-71da67f3262eeffe59cc228986e0a2bb97b6dba5.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 7e006e734c5..e163b361bb8 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -199,6 +199,7 @@ class Project < ApplicationRecord has_one :metrics_setting, inverse_of: :project, class_name: 'ProjectMetricsSetting' has_one :grafana_integration, inverse_of: :project has_one :project_setting, ->(project) { where_or_create_by(project: project) }, inverse_of: :project + has_one :alerting_setting, inverse_of: :project, class_name: 'Alerting::ProjectAlertingSetting' # Merge Requests for target project should be removed with it has_many :merge_requests, foreign_key: 'target_project_id', inverse_of: :target_project @@ -332,6 +333,7 @@ class Project < ApplicationRecord accepts_nested_attributes_for :metrics_setting, update_only: true, allow_destroy: true accepts_nested_attributes_for :grafana_integration, update_only: true, allow_destroy: true accepts_nested_attributes_for :prometheus_service, update_only: true + accepts_nested_attributes_for :alerting_setting, update_only: true delegate :feature_available?, :builds_enabled?, :wiki_enabled?, :merge_requests_enabled?, :forking_enabled?, :issues_enabled?, |