From e0bf7f7d1a83b279d3a1aec6efd375c8dd60dadb Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 6 Dec 2023 14:18:31 -0500 Subject: [PATCH] Fix bad ID values in acknowledge --- daemon-common/faults.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/daemon-common/faults.py b/daemon-common/faults.py index 4481e934..3c044586 100644 --- a/daemon-common/faults.py +++ b/daemon-common/faults.py @@ -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,