diff options
Diffstat (limited to 'app/services/projects/create_service.rb')
-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 |