Skip to content

Commit

Permalink
fix: Fixes filtering of vm attributes and config attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manisha15 committed Aug 1, 2024
1 parent ca904dc commit 2cc40d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/proxmox_vm_attrs_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ def additional_attrs(vms, param_scope, start_checked)
start_after_create: vms.start_after_create,
templated: vms.templated,
}
vms_keys = [:pool, :start_after_create]
vms_keys = [:cpu_type, :nameserver, :searchdomain, :hostname]
extra_attrs = ActiveSupport::HashWithIndifferentAccess.new
attributes.each do |key, value|
camel_key = key.to_s.include?('_') ? snake_to_camel(key.to_s).to_sym : key
nested_key = vms_keys.include?(key) ? key : "config_attributes[#{key}]"
nested_key = vms_keys.include?(key) ? "config_attributes[#{key}]" : key
value = start_checked if key == :start_after_create
extra_attrs[camel_key] = { name: "#{param_scope}[#{nested_key}]", value: value }
end
Expand Down

0 comments on commit 2cc40d9

Please sign in to comment.