Skip to content
Snippets Groups Projects
Verified Commit 19f8ee17 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Only show enabled images for selection

parent 617ac8ab
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
host = @host || f.object.host
server = host.public_send(:wds_server) rescue nil
images = server.all_images rescue []
images = images.select { |img| img.matches_architecture? host.architecture } if host.architecture
images = images.select { |img| img.matches_architecture?(host.architecture) && img.enabled } if host.architecture
boot_images = images.select { |img| img.is_a?(ForemanWds::WdsBootImage) }
install_images = images.select { |img| img.is_a?(ForemanWds::WdsInstallImage) }
install_images = install_images.select { |img| img.version == "#{host.operatingsystem.major}.#{host.operatingsystem.minor}" } if host.operatingsystem
......
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