Skip to content

Commit

Permalink
log deletion of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-wahl committed Sep 28, 2023
1 parent 8684719 commit 4e7327b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def ensure_database(self):
unknown_keys = self.db.fetchall("SELECT DISTINCT name FROM settings WHERE name NOT IN %s", (known_keys,))

if unknown_keys:
self.db.log.info(f"Deleting unknown settings from database: {', '.join([key['name'] for key in unknown_keys])}")
self.db.delete("settings", where={"name": tuple([key["name"] for key in unknown_keys])}, commit=False)

self.db.commit()
Expand Down

0 comments on commit 4e7327b

Please sign in to comment.