Undefined method `html_safe' for nil:NilClass

I am attempting to load a new CPE into my GenieACS instance. The device connects and shows online in the device list, however, when I click “show”, I get the following message,

<% if can?(:create, ‘files’) %>

<% software_version = @device[‘InternetGatewayDevice’][‘DeviceInfo’][‘SoftwareVersion’][’_value’] rescue @device[‘Device’][‘DeviceInfo’][‘SoftwareVersion’][’_value’] rescue ‘’ %>

<%= link_to 'Add Firmware', {controller: 'files', action: 'new', params: {oui: @device['_deviceId']['_OUI'].html_safe, product_class: @device['_deviceId']['_ProductClass'].html_safe, version: software_version.html_safe }} %>

<% end %>

<% if can?(:delete, ‘devices’) %>

Any thoughts?
Thank you.

Something is null (_deviceId._ProductClass) which in theory should never be null given that the product class is part of any inform message.

Try deleting the device and wait for it to inform again.

Ok, I have reached out to the CPE vendor and will pass that along. One thing they asked me for was a list of data models supported by GenieACS? Any thoughts?

Thank you.

So the data model thats supported depends on the provision scripts you write. For ex, in our environment we initially did InternetGatewayDevice because thats what all of our devices used. We are adding a new device which does Device and so I’m currently adding support for that to our provision scripts.

1 Like

ok, so that certainly explains my issue, thank you for the point in the right direction!!