From ee9569e7d409df70c5ce209282bae1c25653afa0 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Fri, 7 Mar 2025 00:37:01 +0800 Subject: [PATCH] Update dashboard.py - Trying to fix #601 --- src/dashboard.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/dashboard.py b/src/dashboard.py index c686d5c..6305fa9 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1600,13 +1600,24 @@ PersistentKeepalive = {str(self.keepalive)} try: if type == "total": sqlUpdate("UPDATE '%s' SET total_data = 0, cumu_data = 0, total_receive = 0, cumu_receive = 0, total_sent = 0, cumu_sent = 0 WHERE id = ?" % self.configuration.Name, (self.id, )) + self.total_data = 0 + self.total_receive = 0 + self.total_sent = 0 + self.cumu_data = 0 + self.cumu_sent = 0 + self.cumu_receive = 0 elif type == "receive": sqlUpdate("UPDATE '%s' SET total_receive = 0, cumu_receive = 0 WHERE id = ?" % self.configuration.Name, (self.id, )) + self.cumu_receive = 0 + self.total_receive = 0 elif type == "sent": sqlUpdate("UPDATE '%s' SET total_sent = 0, cumu_sent = 0 WHERE id = ?" % self.configuration.Name, (self.id, )) + self.cumu_sent = 0 + self.total_sent = 0 else: return False except Exception as e: + print(e) return False return True