Skip to content

Commit

Permalink
Use "unknown" in resize msg if a record has no old flavor
Browse files Browse the repository at this point in the history
  • Loading branch information
mansam committed Apr 26, 2017
1 parent b663b83 commit 00d4ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller/ci_processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ def resize_vm
begin
flavor_id = params['flavor_id']
flavor = find_record_with_rbac(Flavor, flavor_id)
old_flavor = @record.flavor
old_flavor_name = @record.flavor.try(:name) || _("unknown")
@record.resize_queue(session[:userid], flavor)
add_flash(_("Reconfiguring %{instance} \"%{name}\" from %{old_flavor} to %{new_flavor}") % {
:instance => ui_lookup(:table => 'vm_cloud'),
:name => @record.name,
:old_flavor => old_flavor.name,
:old_flavor => old_flavor_name,
:new_flavor => flavor.name})
rescue => ex
add_flash(_("Unable to reconfigure %{instance} \"%{name}\": %{details}") % {
Expand Down

0 comments on commit 00d4ba9

Please sign in to comment.