diff options
Diffstat (limited to 'models/album.py')
-rw-r--r-- | models/album.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/album.py b/models/album.py index b2625db..216b615 100644 --- a/models/album.py +++ b/models/album.py @@ -24,6 +24,8 @@ class Album(): for track in self.tracks: track.delete() + cursor.execute("BEGIN TRANSACTION") + delete_sql = "DELETE FROM album WHERE id = ?" cursor.execute(delete_sql, (self.id,)) @@ -33,6 +35,8 @@ class Album(): delete_artist_rel_sql = "DELETE FROM album_artist WHERE album_id = ?" cursor.execute(delete_artist_rel_sql, (self.id,)) + cursor.execute("COMMIT TRANSACTION") + return True @property |