Bug for new nodes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user