diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/models/pages/virtual_domain.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) | |
download | gitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/models/pages/virtual_domain.rb')
-rw-r--r-- | app/models/pages/virtual_domain.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/models/pages/virtual_domain.rb b/app/models/pages/virtual_domain.rb index 7e42b8e6ae2..90cb8253b52 100644 --- a/app/models/pages/virtual_domain.rb +++ b/app/models/pages/virtual_domain.rb @@ -17,9 +17,16 @@ module Pages end def lookup_paths - projects.map do |project| + paths = projects.map do |project| project.pages_lookup_path(trim_prefix: trim_prefix, domain: domain) - end.sort_by(&:prefix).reverse + end + + # TODO: remove in https://gitlab.com/gitlab-org/gitlab/-/issues/297524 + # source can only be nil if pages_serve_from_legacy_storage FF is disabled + # we can remove this filtering once we remove legacy storage + paths = paths.select(&:source) + + paths.sort_by(&:prefix).reverse end private |