Skip to content
Snippets Groups Projects
Unverified Commit 9dce460c authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix selected_programs

parent fc8ee1e4
No related branches found
No related tags found
No related merge requests found
......@@ -12,11 +12,12 @@ class Communication::Block::Template::Program < Communication::Block::Template::
end
def selected_programs
@selected_programs ||= elements.map { |element|
@selected_programs ||= elements.map { |element|
program = element.program
next if program.nil?
l10n = program.localization_for(about.language)
next if l10n.draft?
element.program
element.program
}.compact
end
......@@ -27,7 +28,7 @@ class Communication::Block::Template::Program < Communication::Block::Template::
def available_programs
website.education_programs
end
def children
selected_programs
end
......
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