Make it possible to delete revisions in the history dialog
This commit is contained in:
parent
4ec8c64994
commit
807a21e9af
4 changed files with 46 additions and 4 deletions
|
|
@ -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]:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue