theforeman / foreman_fog_proxmox

Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
GNU General Public License v3.0
106 stars 33 forks source link

Error on "Create Image" - "ActionView::Template::Error: undefined method `downcase' for XYZ:Integer" #125

Closed hlawatschek closed 4 years ago

hlawatschek commented 4 years ago

Describe the bug

Environment: foreman 1.22.2 foreman-fog-proxmox 0.8 proxmox PVE 6.1-5

When I try to create a new Image (click on "Create Image" using the proxmox compute resource I receive the following error message:

"ActionView::Template::Error: undefined method `downcase' for 102:Integer"

PR production.log: 2020-01-27T13:48:06 [W|app|96dff58e] Action failed ActionView::Template::Error: undefined method downcase' for 102:Integer /usr/share/foreman/app/helpers/images_helper.rb:7:inblock in image_field' /usr/share/foreman/app/helpers/images_helper.rb:7:in each' /usr/share/foreman/app/helpers/images_helper.rb:7:insort_by' /usr/share/foreman/app/helpers/images_helper.rb:7:in image_field' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_fog_proxmox-0.8.0/app/views/images/form/_proxmox.html.erb:21:in_37e3ce124e46393f7c33866ac6c97f95' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/template.rb:159:in block in render' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:170:ininstrument' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/template.rb:354:in instrument_render_template' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/template.rb:157:inrender' /opt/theforeman/tfm/root/usr/share/gems/gems/deface-1.3.2/lib/deface/action_view_extensions.rb:41:in render' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/renderer/partial_renderer.rb:344:inblock in render_partial' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/renderer/abstract_renderer.rb:44:in block in instrument' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:inblock in instrument' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in instrument' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:ininstrument' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/renderer/abstract_renderer.rb:43:in instrument' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/renderer/partial_renderer.rb:333:inrender_partial' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/renderer/partial_renderer.rb:312:in render' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/renderer/renderer.rb:49:inrender_partial' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/helpers/rendering_helper.rb:36:in render' /usr/share/foreman/app/views/images/_form.html.erb:7:inblock in _f7c22ada2c5ade9567e55b0054dd201c' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/helpers/capture_helper.rb:41:in block in capture' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/helpers/capture_helper.rb:205:inwith_output_buffer' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/helpers/capture_helper.rb:41:in `capture'

To Reproduce Steps to reproduce the behavior:

  1. Go to Infrastructure - compure resource - proxmox
  2. Click on 'Create Image"
  3. See error

Expected behavior The create image form should be displayed