Make it possible to delete revisions in the history dialog
Some checks failed
CI / test (push) Successful in 4m57s
Lint / test (push) Failing after 31s
Trivy / test (push) Successful in 24s

This commit is contained in:
Miguel Jacq 2025-11-24 10:56:04 +11:00
parent 4ec8c64994
commit 807a21e9af
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
4 changed files with 46 additions and 4 deletions

View file

@ -369,6 +369,17 @@ class DBManager:
(version_id, date_iso),
)
def delete_version(self, *, version_id: int) -> bool | None:
"""
Delete a specific version by version_id.
"""
cur = self.conn.cursor()
row = cur.execute(
"DELETE FROM versions WHERE id=?;",
(version_id,),
)
return True
# ------------------------- Export logic here ------------------------#
def get_all_entries(self) -> List[Entry]:
"""