This commit is contained in:
Tim Bentley 2011-12-03 17:01:57 +00:00
parent 624216a1b8
commit 8c4397d380
2 changed files with 7 additions and 5 deletions

View File

@ -201,7 +201,9 @@ class Manager(object):
settings.endGroup() settings.endGroup()
if upgrade_mod: if upgrade_mod:
db_ver, up_ver = upgrade_db(self.db_url, upgrade_mod) db_ver, up_ver = upgrade_db(self.db_url, upgrade_mod)
print db_ver, up_ver, db_ver > up_ver
if db_ver > up_ver: if db_ver > up_ver:
print "hello"
critical_error_message_box( critical_error_message_box(
translate('OpenLP.Manager', 'Database Error'), translate('OpenLP.Manager', 'Database Error'),
unicode(translate('OpenLP.Manager', 'The database being ' unicode(translate('OpenLP.Manager', 'The database being '
@ -361,10 +363,10 @@ class Manager(object):
``object_class`` ``object_class``
The type of object to delete The type of object to delete
``filter_clause`` ``filter_clause``
The filter governing selection of objects to return. Defaults to The filter governing selection of objects to return. Defaults to
None. None.
""" """
try: try:
query = self.session.query(object_class) query = self.session.query(object_class)

View File

@ -272,7 +272,7 @@ class SongMediaItem(MediaManagerItem):
for song in searchresults: for song in searchresults:
# Do not display temporary songs # Do not display temporary songs
if song.temporary == u'Y': if song.temporary == u'Y':
break continue
author_list = [author.display_name for author in song.authors] author_list = [author.display_name for author in song.authors]
song_title = unicode(song.title) song_title = unicode(song.title)
song_detail = u'%s (%s)' % (song_title, u', '.join(author_list)) song_detail = u'%s (%s)' % (song_title, u', '.join(author_list))
@ -291,7 +291,7 @@ class SongMediaItem(MediaManagerItem):
for song in author.songs: for song in author.songs:
# Do not display temporary songs # Do not display temporary songs
if song.temporary == u'Y': if song.temporary == u'Y':
break continue
song_detail = u'%s (%s)' % (author.display_name, song.title) song_detail = u'%s (%s)' % (author.display_name, song.title)
song_name = QtGui.QListWidgetItem(song_detail) song_name = QtGui.QListWidgetItem(song_detail)
song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id)) song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id))
@ -568,7 +568,7 @@ class SongMediaItem(MediaManagerItem):
else: else:
# Make sure we temporary import formatting tags. # Make sure we temporary import formatting tags.
song = self.openLyrics.xml_to_song(item.xml_version, True) song = self.openLyrics.xml_to_song(item.xml_version, True)
#editId = song.id editId = song.id
# Update service with correct song id. # Update service with correct song id.
if editId: if editId:
Receiver.send_message(u'service_item_update', Receiver.send_message(u'service_item_update',