From ae01d912e10c0cf2644f714822ab6ad8dbd7aaf3 Mon Sep 17 00:00:00 2001 From: Roland W-H Date: Sun, 27 Apr 2025 11:55:49 +0100 Subject: [PATCH] additional comments --- src/db_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/db_handler.py b/src/db_handler.py index 47c7cdf..baaaaf6 100644 --- a/src/db_handler.py +++ b/src/db_handler.py @@ -80,6 +80,7 @@ class DBHandler: return plat_name_list + # Write updated platform data to DB when changes are saved def write_platforms(self, plat_list: list[Platform]): for i in range(len(plat_list)): platforms_data = [ @@ -242,10 +243,12 @@ class DBHandler: return user_details_dict + # Toggle whether fees for this platform should be calculated def toggle_platform_state(self, index: int, state: bool): self.cur.execute("UPDATE tblPlatforms SET IsEnabled = ? WHERE PlatformID = ?", [state, index]) self.conn.commit() + # Remove a platform from the DB - update the IDs to keep them sequential def remove_platform(self, index: int): tbl_list = ["tblPlatforms", "tblFlatPlatFees", "tblFlatDealFees", "tblFundPlatFee"] for tbl in tbl_list: