Skip to content

Commit

Permalink
more updates, thanks to Manisha
Browse files Browse the repository at this point in the history
  • Loading branch information
Kees van Veen committed Oct 7, 2024
1 parent 67e7724 commit ddc98e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/foreman_fog_proxmox/proxmox_volumes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def update_extra_volumes_definitions(data_in)
volumes_attributes = {}
value.each do |index, dev_specs|
# Only if this contains only 1 set like: {"size"=>"xxGB"}
if #{index} > 0 && dev_specs.keys.count == 1
if index > 0 && dev_specs.keys.count == 1
# Copy the data from the first entry
newid = "#{value['0']['controller']}#{index}"
newdev = {
Expand All @@ -55,7 +55,6 @@ def update_extra_volumes_definitions(data_in)
new_data['volumes_attributes'] = volumes_attributes
end
end
return new_data
end

def delete_volume(vm, id, volume_attributes)
Expand Down

0 comments on commit ddc98e9

Please sign in to comment.