Skip to content

Commit 267f649

Browse files
authored
Merge pull request #9474 from elsamaryv/bug-fix-vm-host-nil-err
Fix error on VM reconfigure when host is nil
2 parents 4edcd40 + fb2655c commit 267f649

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/controllers/mixins/actions/vm_actions/reconfigure.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ def reconfigure_calculations(mbsize)
213213

214214
# determine available switches for this host...
215215
def get_vlan_options(host)
216+
return [] if host.blank?
217+
216218
switch_ids = Rbac.filtered(host.switches).pluck(:id)
217219
Rbac.filtered(Lan.where(:switch_id => switch_ids).order(:name)).pluck(:name)
218220
end

0 commit comments

Comments
 (0)