Hello, not quite sure how to report a bug, but I noticed what I believe is a typo on line 30 of /opt/librenms/app/Models/WirelessSensor.php:
the line is currently:
protected $primaryKey = ‘sensors_id’
However, it think it should be singular:
protected $primaryKey = ‘sensor_id’
I discovered this when running an alert template with the following line:
{{ $value[‘sensor_descr’] }} {{ $value[‘sensor_class’] }}: {{ \App\Models\WirelessSensor::find($value[‘sensor_id’])->sensor_current }}
When this template runs, it generates the following error:
Warning! Fallback template used due to error in template Wireless Client Count: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘wireless_sensors.sensors_id’ in ‘where clause’ (Connection: mysql, SQL: select * from wireless_sensors
where wireless_sensors
.sensors_id
= 1 limit 1) (View: /opt/librenms/storage/framework/views/5c8803782286d32eaafd0eedadc65f57.blade.php)