← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/bug-863845 into lp:openlp

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bug-863845 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bug-863845/+merge/84380

Fix problem where importing new song databases now does not work.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bug-863845/+merge/84380
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-863845 into lp:openlp.
=== modified file 'openlp/plugins/songs/lib/olpimport.py'
--- openlp/plugins/songs/lib/olpimport.py	2011-12-02 20:17:57 +0000
+++ openlp/plugins/songs/lib/olpimport.py	2011-12-03 18:27:29 +0000
@@ -39,7 +39,11 @@
 from openlp.core.lib.db import BaseModel
 from openlp.core.ui.wizard import WizardStrings
 from openlp.plugins.songs.lib import clean_song
+<<<<<<< TREE
 from openlp.plugins.songs.lib.db import Author, Book, MediaFile, Song, Topic
+=======
+from openlp.plugins.songs.lib.db import Author, Book, Song, Topic, MediaFile
+>>>>>>> MERGE-SOURCE
 from songimport import SongImport
 
 log = logging.getLogger(__name__)
@@ -143,7 +147,8 @@
                     secondary=source_media_files_songs_table)
             else:
                 song_props['media_files'] = relation(OldMediaFile,
-                    backref='songs')
+                    backref='songs', primaryjoin=source_songs_table.c.id==OldMediaFile.song_id,
+                    foreign_keys=[source_media_files_table.c.song_id])
         try:
             class_mapper(OldAuthor)
         except UnmappedClassError:


Follow ups