Bug for new nodes

This commit is contained in:
Logan
2026-05-25 16:29:20 -04:00
parent 84ab72442f
commit c5932165d8
+7 -3
View File
@@ -104,9 +104,13 @@ class MQTTHandler:
"lat": payload.get("lat", existing.get("lat", 0.0)),
"lon": payload.get("lon", existing.get("lon", 0.0)),
}
# Only promote to online if already configured (don't overwrite explicit status)
if existing.get("configured") and existing.get("status") not in ("recording",):
updates["status"] = "online"
# Update status on checkin (don't clobber an active recording)
if existing.get("status") not in ("recording",):
if existing.get("configured"):
updates["status"] = "online"
elif existing.get("approval_status") == "approved":
# Approved but not yet configured — restore reachable status after reboot
updates["status"] = "unconfigured"
await fstore.doc_update("nodes", node_id, updates)
# NOTE: discord_connected in checkins is informational only — do NOT release the