mirror of
https://github.com/unpoller/unpoller.git
synced 2026-04-05 09:04:10 -04:00
fixes NPE on issue #422
This commit is contained in:
@@ -24,10 +24,14 @@ func (u *InfluxUnifi) batchUXG(r report, s *unifi.UXG) { // nolint: funlen
|
||||
"serial": s.Serial,
|
||||
"type": s.Type,
|
||||
}
|
||||
var gw *unifi.Gw = nil
|
||||
if s.Stat != nil {
|
||||
gw = s.Stat.Gw
|
||||
}
|
||||
fields := Combine(
|
||||
u.batchUDMstorage(s.Storage),
|
||||
u.batchUDMtemps(s.Temperatures),
|
||||
u.batchUSGstats(s.SpeedtestStatus, s.Stat.Gw, s.Uplink),
|
||||
u.batchUSGstats(s.SpeedtestStatus, gw, s.Uplink),
|
||||
u.batchSysStats(s.SysStats, s.SystemStats),
|
||||
map[string]any{
|
||||
"source": s.SourceName,
|
||||
|
||||
Reference in New Issue
Block a user