Fix bad ID values in acknowledge

This commit is contained in:
Joshua Boniface 2023-12-06 14:18:31 -05:00
parent 0c34c88a1f
commit e0bf7f7d1a
1 changed files with 6 additions and 3 deletions

View File

@ -171,8 +171,11 @@ def acknowledge(zkhandler, fault_id=None):
if fault["status"] != "ack":
zkhandler.write(
[
(("faults.ack_time", fault_id), str(datetime.now()).split(".")[0]),
(("faults.status", fault_id), "ack"),
(
("faults.ack_time", fault["id"]),
str(datetime.now()).split(".")[0],
),
(("faults.status", fault["id"]), "ack"),
]
)
@ -197,7 +200,7 @@ def delete(zkhandler, fault_id=None):
faults = [fault]
for fault in faults:
zkhandler.delete(("faults.id", fault_id), recursive=True)
zkhandler.delete(("faults.id", fault["id"]), recursive=True)
return (
True,