Skip to content
Snippets Groups Projects
Commit c30a517d authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix

parent b010f2fc
No related branches found
No related tags found
No related merge requests found
......@@ -3,12 +3,17 @@ class Communication::Block::Partner < Communication::Block::Abstract
elements.each do |partner|
blob = find_blob partner, 'logo'
add_dependency blob unless blob.nil?
id = partner['id']
next if id.blank?
organization = university.organizations.find id
next if organization.nil?
add_dependency organization
add_dependency organization.active_storage_blobs
add_partner partner['id']
end
end
protected
def add_partner(id)
next if id.blank?
organization = university.organizations.find id
next if organization.nil?
add_dependency organization
add_dependency organization.active_storage_blobs
end
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