Fix deleting song books

Fixes: https://launchpad.net/bugs/1600510
This commit is contained in:
Phill 2019-07-30 20:52:10 +01:00
parent 603a6ff7d6
commit 5fb9eb70af
1 changed files with 3 additions and 1 deletions

View File

@ -374,7 +374,9 @@ def init_schema(url):
mapper(SongBookEntry, songs_songbooks_table, properties={
'songbook': relation(Book)
})
mapper(Book, song_books_table)
mapper(Book, song_books_table, properties={
'songs': relation(Song, secondary=songs_songbooks_table)
})
mapper(MediaFile, media_files_table)
mapper(Song, songs_table, properties={
# Use the authors_songs relation when you need access to the 'author_type' attribute