summaryrefslogtreecommitdiff
path: root/app/models/pages_domain.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/pages_domain.rb')
-rw-r--r--app/models/pages_domain.rb12
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