forked from openlp/openlp
Sometimes the song_id column doesn't exist on the model, so we use the table instead.
This commit is contained in:
parent
def18307cc
commit
2016ce61ca
@ -144,8 +144,9 @@ class OpenLPSongImport(SongImport):
|
|||||||
secondary=source_media_files_songs_table)
|
secondary=source_media_files_songs_table)
|
||||||
else:
|
else:
|
||||||
song_props['media_files'] = relation(OldMediaFile,
|
song_props['media_files'] = relation(OldMediaFile,
|
||||||
backref='songs', primaryjoin=source_songs_table.c.id==OldMediaFile.song_id,
|
backref='songs',
|
||||||
foreign_keys=[source_media_files_table.c.song_id])
|
primaryjoin=source_songs_table.c.id == \
|
||||||
|
source_media_files_table.c.song_id)
|
||||||
try:
|
try:
|
||||||
class_mapper(OldAuthor)
|
class_mapper(OldAuthor)
|
||||||
except UnmappedClassError:
|
except UnmappedClassError:
|
||||||
|
Loading…
Reference in New Issue
Block a user