diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 10:03:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 10:03:30 +0000 |
commit | d35df0ad158c14cb28f583f4b26c4196ef23a3f7 (patch) | |
tree | 5a1992758772519104eacb5de2c231721876541c /app/services | |
parent | 3c51da6f5782e53123a7ed5af98ba0828cbfa49f (diff) | |
download | gitlab-ce-d35df0ad158c14cb28f583f4b26c4196ef23a3f7.tar.gz |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/discussions/capture_diff_note_position_service.rb | 1 | ||||
-rw-r--r-- | app/services/projects/create_service.rb | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/app/services/discussions/capture_diff_note_position_service.rb b/app/services/discussions/capture_diff_note_position_service.rb index 273a60f7e55..8f12470d9e8 100644 --- a/app/services/discussions/capture_diff_note_position_service.rb +++ b/app/services/discussions/capture_diff_note_position_service.rb @@ -17,6 +17,7 @@ module Discussions return unless result position = result[:position] + return unless position # Currently position data is copied across all notes of a discussion # It makes sense to store a position only for the first note instead diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index cef86e9763c..429ae905e3d 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -173,6 +173,10 @@ module Projects def create_prometheus_service service = @project.find_or_initialize_service(::PrometheusService.to_param) + # If the service has already been inserted in the database, that + # means it came from a template, and there's nothing more to do. + return if service.persisted? + if service.prometheus_available? service.save! else |