diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 13:03:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 13:03:30 +0300 |
commit | d35df0ad158c14cb28f583f4b26c4196ef23a3f7 (patch) | |
tree | 5a1992758772519104eacb5de2c231721876541c /app/services/projects | |
parent | 3c51da6f5782e53123a7ed5af98ba0828cbfa49f (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'app/services/projects')
-rw-r--r-- | app/services/projects/create_service.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |