forked from openlp/openlp
fixes
This commit is contained in:
parent
5c2b70ff07
commit
a950a9bcce
@ -330,6 +330,8 @@ def parse_reference(reference, bible, language_selection, book_ref_id=False):
|
|||||||
book_ref_ids = bible.get_book_ref_id_by_localised_name(book, language_selection)
|
book_ref_ids = bible.get_book_ref_id_by_localised_name(book, language_selection)
|
||||||
elif not bible.get_book_by_book_ref_id(book_ref_id):
|
elif not bible.get_book_by_book_ref_id(book_ref_id):
|
||||||
return []
|
return []
|
||||||
|
else:
|
||||||
|
book_ref_ids = [book_ref_id]
|
||||||
# We have not found the book so do not continue
|
# We have not found the book so do not continue
|
||||||
if not book_ref_ids:
|
if not book_ref_ids:
|
||||||
return []
|
return []
|
||||||
|
@ -318,6 +318,7 @@ class BibleDB(Manager):
|
|||||||
db_books = self.get_books(book)
|
db_books = self.get_books(book)
|
||||||
return [db_book.book_reference_id for db_book in db_books]
|
return [db_book.book_reference_id for db_book in db_books]
|
||||||
else:
|
else:
|
||||||
|
book_list = []
|
||||||
if language_selection == LanguageSelection.Application:
|
if language_selection == LanguageSelection.Application:
|
||||||
books = [key for key in list(book_names.keys()) if regex_book.match(book_names[key])]
|
books = [key for key in list(book_names.keys()) if regex_book.match(book_names[key])]
|
||||||
book_list = [_f for _f in map(BiblesResourcesDB.get_book, books) if _f]
|
book_list = [_f for _f in map(BiblesResourcesDB.get_book, books) if _f]
|
||||||
|
@ -182,4 +182,4 @@ class TestTheme(TestCase):
|
|||||||
assert 0 == theme.display_vertical_align, 'display_vertical_align should be 0'
|
assert 0 == theme.display_vertical_align, 'display_vertical_align should be 0'
|
||||||
assert theme.font_footer_bold is False, 'font_footer_bold should be False'
|
assert theme.font_footer_bold is False, 'font_footer_bold should be False'
|
||||||
assert 'Arial' == theme.font_main_name, 'font_main_name should be "Arial"'
|
assert 'Arial' == theme.font_main_name, 'font_main_name should be "Arial"'
|
||||||
assert 47 == len(theme.__dict__), 'The theme should have 47 attributes'
|
assert 48 == len(theme.__dict__), 'The theme should have 48 attributes'
|
||||||
|
Loading…
Reference in New Issue
Block a user