This commit is contained in:
Gleb Tcivie 2024-08-09 20:29:50 +03:00
parent 6dc3116622
commit 0b8bd8e025

View file

@ -42,7 +42,7 @@ def update_node_status(node_number, status):
cur.execute("INSERT INTO node_details (node_id, mqtt_status, short_name, long_name) VALUES (%s, %s, %s, %s)"
"ON CONFLICT(node_id)"
"DO UPDATE SET mqtt_status = %s",
(node_number, status, status, 'Unknown (MQTT)', 'Unknown (MQTT)'))
(node_number, status, 'Unknown (MQTT)', 'Unknown (MQTT)', status))
conn.commit()