summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-23 09:09:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-23 09:09:42 +0000
commite4bf776a8829e5186a0f63603c0be627b891d80e (patch)
tree537fe714bd336bfee9f30b101a5072950a04a62a /app/controllers
parent1635eacd2a9293cd04d21e82def6e2c14ed01242 (diff)
downloadgitlab-ce-e4bf776a8829e5186a0f63603c0be627b891d80e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/serverless/domains_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/serverless/domains_controller.rb b/app/controllers/admin/serverless/domains_controller.rb
index 9741a0716f2..1d4f10e033f 100644
--- a/app/controllers/admin/serverless/domains_controller.rb
+++ b/app/controllers/admin/serverless/domains_controller.rb
@@ -9,7 +9,7 @@ class Admin::Serverless::DomainsController < Admin::ApplicationController
end
def create
- if PagesDomain.instance_serverless.count > 0
+ if PagesDomain.instance_serverless.exists?
return redirect_to admin_serverless_domains_path, notice: _('An instance-level serverless domain already exists.')
end
@@ -31,7 +31,7 @@ class Admin::Serverless::DomainsController < Admin::ApplicationController
end
def destroy
- if domain.serverless_domain_clusters.count > 0
+ if domain.serverless_domain_clusters.exists?
return redirect_to admin_serverless_domains_path,
status: :conflict,
notice: _('Domain cannot be deleted while associated to one or more clusters.')