diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-12-03 19:33:38 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-12-03 19:33:38 +0300 |
commit | 363c57468dc6f656c6c345f0b9eda32029571201 (patch) | |
tree | b57ac4ad27bed9440948d01c32cc8450aae345ae /app/services/clusters | |
parent | 7691e015d7c103b39a92e3a18f6dff5ff9602394 (diff) |
Raise error when trying to create second cluster
Diffstat (limited to 'app/services/clusters')
-rw-r--r-- | app/services/clusters/create_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/clusters/create_service.rb b/app/services/clusters/create_service.rb index 798c308024b..a47ce5a8887 100644 --- a/app/services/clusters/create_service.rb +++ b/app/services/clusters/create_service.rb @@ -5,7 +5,7 @@ module Clusters def execute(access_token) @access_token = access_token - return unless can_create_cluster? + raise Exception.new('Instance does not support multiple clusters') unless can_create_cluster? create_cluster.tap do |cluster| ClusterProvisionWorker.perform_async(cluster.id) if cluster.persisted? |