diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /app/models/pages_domain.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/models/pages_domain.rb')
-rw-r--r-- | app/models/pages_domain.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb index 4668fc265a0..c932d0bf800 100644 --- a/app/models/pages_domain.rb +++ b/app/models/pages_domain.rb @@ -50,6 +50,8 @@ class PagesDomain < ApplicationRecord after_update :update_daemon, if: :saved_change_to_pages_config? after_destroy :update_daemon + scope :for_project, ->(project) { where(project: project) } + scope :enabled, -> { where('enabled_until >= ?', Time.current ) } scope :needs_verification, -> do verified_at = arel_table[:verified_at] @@ -225,16 +227,6 @@ class PagesDomain < ApplicationRecord def pages_deployed? return false unless project - # TODO: remove once `pages_metadatum` is migrated - # https://gitlab.com/gitlab-org/gitlab/issues/33106 - unless project.pages_metadatum - Gitlab::BackgroundMigration::MigratePagesMetadata - .new - .perform_on_relation(Project.where(id: project_id)) - - project.reset - end - project.pages_metadatum&.deployed? end |