diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 09:09:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 09:09:42 +0000 |
commit | e4bf776a8829e5186a0f63603c0be627b891d80e (patch) | |
tree | 537fe714bd336bfee9f30b101a5072950a04a62a /app/controllers | |
parent | 1635eacd2a9293cd04d21e82def6e2c14ed01242 (diff) | |
download | gitlab-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.rb | 4 |
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.') |