summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 15:42:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 15:42:17 +0000
commit44fdf983bd35328dd577d3d3650d14163ef3e2b6 (patch)
tree84ff300d056cfbabb5a0fe2a9cbaa80aaeab1cc5 /app/models
parentbc9fa07b26184b5c94808f704db6ea1ac81bf4de (diff)
downloadgitlab-ce-44fdf983bd35328dd577d3d3650d14163ef3e2b6.tar.gz
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'app/models')
-rw-r--r--app/models/application_setting.rb1
-rw-r--r--app/models/project_services/alerts_service.rb2
-rw-r--r--app/models/project_setting.rb2
3 files changed, 5 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index c1e44748304..0aa0216558f 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -14,6 +14,7 @@ class ApplicationSetting < ApplicationRecord
add_authentication_token_field :static_objects_external_storage_auth_token
belongs_to :self_monitoring_project, class_name: "Project", foreign_key: 'instance_administration_project_id'
+ belongs_to :push_rule
alias_attribute :self_monitoring_project_id, :instance_administration_project_id
belongs_to :instance_administrators_group, class_name: "Group"
diff --git a/app/models/project_services/alerts_service.rb b/app/models/project_services/alerts_service.rb
index 2f7902d9617..16bf37fd189 100644
--- a/app/models/project_services/alerts_service.rb
+++ b/app/models/project_services/alerts_service.rb
@@ -15,6 +15,8 @@ class AlertsService < Service
before_validation :ensure_token, if: :activated?
def url
+ return if instance? || template?
+
url_helpers.project_alerts_notify_url(project, format: :json)
end
diff --git a/app/models/project_setting.rb b/app/models/project_setting.rb
index 37e4a7be770..7c93faf3928 100644
--- a/app/models/project_setting.rb
+++ b/app/models/project_setting.rb
@@ -9,3 +9,5 @@ class ProjectSetting < ApplicationRecord
where(primary_key => safe_find_or_create_by(attrs))
end
end
+
+ProjectSetting.prepend_if_ee('EE::ProjectSetting')