Skip to content

Commit

Permalink
Fix exception when listing available flavors for a flavorless vm
Browse files Browse the repository at this point in the history
  • Loading branch information
mansam committed Apr 26, 2017
1 parent 5f643d8 commit 394aeb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller/ci_processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def resize_form_fields
unless @record.ext_management_system.nil?
@record.ext_management_system.flavors.each do |ems_flavor|
# include only flavors with root disks at least as big as the instance's current root disk.
if (ems_flavor != @record.flavor) && (ems_flavor.root_disk_size >= @record.flavor.root_disk_size)
if @record.flavor.nil? || ((ems_flavor != @record.flavor) && (ems_flavor.root_disk_size >= @record.flavor.root_disk_size))
flavors << {:name => ems_flavor.name_with_details, :id => ems_flavor.id}
end
end
Expand Down

0 comments on commit 394aeb8

Please sign in to comment.