summaryrefslogtreecommitdiff
path: root/app/models/pages_domain.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-25 09:06:04 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-25 09:06:04 +0000
commit1cfd8874ee6702184d5608f533b30bab722b4f9d (patch)
tree4921070efdc0ad2d1c3c7d8a3a60c73928b57d25 /app/models/pages_domain.rb
parentfbcb36880cda3a29cfa4ebed4d080701c302256b (diff)
downloadgitlab-ce-1cfd8874ee6702184d5608f533b30bab722b4f9d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/pages_domain.rb')
-rw-r--r--app/models/pages_domain.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb
index 22a6bae7cf7..6be3053f637 100644
--- a/app/models/pages_domain.rb
+++ b/app/models/pages_domain.rb
@@ -186,11 +186,17 @@ class PagesDomain < ApplicationRecord
end
def pages_virtual_domain
+ return unless pages_deployed?
+
Pages::VirtualDomain.new([project], domain: self)
end
private
+ def pages_deployed?
+ project.pages_metadatum&.deployed?
+ end
+
def set_verification_code
return if self.verification_code.present?