Merge branch 'random-cleanups-3' into 'master'

Random cleanups

See merge request openlp/openlp!371
This commit is contained in:
Tim Bentley 2021-11-27 08:58:58 +00:00
commit b9f27a5252
3 changed files with 6 additions and 7 deletions

View File

@ -192,10 +192,10 @@ class UiIcons(metaclass=Singleton):
else:
setattr(self, key, qta.icon(icon))
except Exception:
log.exception('Unexpected error for icon: {icon}'.format(icon=icon))
log.exception(f'Unexpected error for icon: {icon}')
setattr(self, key, qta.icon('fa.exclamation-circle', color='red'))
except Exception:
log.exception('Unexpected error for icon: {icon}'.format(icon=icon))
log.exception(f'Unexpected error for icon with key: {key}')
setattr(self, key, qta.icon('fa.exclamation-circle', color='red'))
@staticmethod

View File

@ -330,7 +330,6 @@ class BibleDB(Manager):
if not book_list:
book_list = books
return [value['id'] for value in book_list if self.get_book_by_book_ref_id(value['id'])]
return []
def get_verses(self, reference_list, show_error=True):
"""

View File

@ -64,10 +64,10 @@ class WorshipCenterProImport(SongImport):
records = cursor.fetchall()
songs = {}
for record in records:
id = record.ID
if id not in songs:
songs[id] = {}
songs[id][record.Field] = record.Value
record_id = record.ID
if record_id not in songs:
songs[record_id] = {}
songs[record_id][record.Field] = record.Value
self.import_wizard.progress_bar.setMaximum(len(songs))
for song in songs:
if self.stop_import_flag: