Skip to content
Snippets Groups Projects
Unverified Commit 98d906c5 authored by Pierre-André Boissinot's avatar Pierre-André Boissinot Committed by GitHub
Browse files

Merge pull request #1035 from noesya/optimize_page_dependencies

better dependencies for page
parents 9ff8181d 553e5543
No related branches found
No related tags found
No related merge requests found
......@@ -97,9 +97,10 @@ class Communication::Website::Page < ApplicationRecord
end
def dependencies
active_storage_blobs +
blocks +
children
calculated_dependencies = active_storage_blobs + blocks
# children are used only if there is no block to display
calculated_dependencies += children unless blocks.published.any?
calculated_dependencies
end
def references
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment