This commit is contained in:
Samuel Mehrbrodt 2014-05-07 12:21:27 +02:00
parent ef2a03d510
commit aaacbeac69
3 changed files with 3 additions and 3 deletions

View File

@ -187,7 +187,7 @@ class OpenLPSongImport(SongImport):
first_name=author.first_name,
last_name=author.last_name,
display_name=author.display_name)
new_song.authors.add_author(existing_author)
new_song.add_author(existing_author)
if song.book:
existing_song_book = self.manager.get_object_filtered(Book, Book.name == song.book.name)
if existing_song_book is None:

View File

@ -325,7 +325,7 @@ class SongImport(QtCore.QObject):
author = Author.populate(display_name=author_text,
last_name=author_text.split(' ')[-1],
first_name=' '.join(author_text.split(' ')[:-1]))
song.authors.add_author(author)
song.add_author(author)
if self.song_book_name:
song_book = self.manager.get_object_filtered(Book, Book.name == self.song_book_name)
if song_book is None:

View File

@ -203,6 +203,6 @@ class SongSelectImport(object):
author = Author.populate(first_name=author_name.rsplit(' ', 1)[0],
last_name=author_name.rsplit(' ', 1)[1],
display_name=author_name)
db_song.authors.add_author(author)
db_song.add_author(author)
self.db_manager.save_object(db_song)
return db_song