Fix error closing playlist
This commit is contained in:
parent
ec760ca0d4
commit
823d0b6628
@ -180,7 +180,9 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
def close_playlist(self):
|
def close_playlist(self):
|
||||||
with Session() as session:
|
with Session() as session:
|
||||||
self.visible_playlist().db.close(session)
|
playlist_db = session.query(Playlists).filter(
|
||||||
|
Playlists.id == self.visible_playlist().id).one()
|
||||||
|
playlist_db.close(session)
|
||||||
index = self.tabPlaylist.currentIndex()
|
index = self.tabPlaylist.currentIndex()
|
||||||
self.tabPlaylist.removeTab(index)
|
self.tabPlaylist.removeTab(index)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user