fix(dashboard): narrow snr directly so mypy accepts float(snr)

mypy cannot track non-Noneness through the intermediate `corroborated`
boolean, so `float(snr)` in the discover-only neighbor branch was flagged
as `Any | None`. Test the value directly; `corroborated` still backs the
`signal_corroborated` field.
This commit is contained in:
agessaman
2026-08-21 20:38:48 -07:00
parent 25671f28de
commit 030bee95ca
+1 -1
View File
@@ -1338,7 +1338,7 @@ class DashboardStatsService:
"name": (contact["name"] if contact else None) or key[:12],
"public_key": (contact["public_key"] if contact else key),
"role": normalize_role(contact["role"] if contact else None),
"snr": round(float(snr), 1) if corroborated else None,
"snr": round(float(snr), 1) if snr is not None else None,
"rssi": None,
"signal_corroborated": corroborated,
"last_seen": link.get("last_seen"),