forked from openlp/openlp
Clean up
This commit is contained in:
parent
a23d902fa5
commit
9a30a4ae6a
@ -365,7 +365,8 @@ class BibleDB(QtCore.QObject, Manager):
|
|||||||
The name of the book to return.
|
The name of the book to return.
|
||||||
"""
|
"""
|
||||||
log.debug(u'BibleDb.get_book_by_book_ref_id("%s")', id)
|
log.debug(u'BibleDb.get_book_by_book_ref_id("%s")', id)
|
||||||
db_book = self.get_object_filtered(Book, Book.book_reference_id.like(id))
|
db_book = self.get_object_filtered(Book,
|
||||||
|
Book.book_reference_id.like(id))
|
||||||
return db_book
|
return db_book
|
||||||
|
|
||||||
def get_verses(self, reference_list, en_reference_list):
|
def get_verses(self, reference_list, en_reference_list):
|
||||||
@ -874,26 +875,6 @@ class SpellingDB(QtCore.QObject, Manager):
|
|||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return id[0]
|
return id[0]
|
||||||
|
|
||||||
def get_book_name_by_reference_id(self, id, language):
|
|
||||||
"""
|
|
||||||
Return the name of a book by id and language.
|
|
||||||
|
|
||||||
``id``
|
|
||||||
The name to search the id.
|
|
||||||
|
|
||||||
``language``
|
|
||||||
The language for which should be searched
|
|
||||||
"""
|
|
||||||
log.debug(u'SpellingDB.get_book_name_by_reference_id("%s", "%s")', id,
|
|
||||||
language)
|
|
||||||
name = self.session.query(Spelling.name)\
|
|
||||||
.filter(Spelling.book_reference_id.like(id))\
|
|
||||||
.filter(Spelling.language_id.like(language)).first()
|
|
||||||
if not name:
|
|
||||||
return None
|
|
||||||
else:
|
|
||||||
return unicode(name[0])
|
|
||||||
|
|
||||||
def create_spelling(self, name, book_reference_id, language_id):
|
def create_spelling(self, name, book_reference_id, language_id):
|
||||||
"""
|
"""
|
||||||
|
@ -300,7 +300,8 @@ class BibleManager(object):
|
|||||||
get_book_ref_id_by_name(book, language_id)
|
get_book_ref_id_by_name(book, language_id)
|
||||||
book = self.db_cache[bible].get_book_by_book_ref_id(
|
book = self.db_cache[bible].get_book_by_book_ref_id(
|
||||||
book_ref_id)
|
book_ref_id)
|
||||||
new_reflist.append((book.name, item[1], item[2], item[3]))
|
new_reflist.append((book.name, item[1], item[2],
|
||||||
|
item[3]))
|
||||||
reflist = new_reflist
|
reflist = new_reflist
|
||||||
log.debug(u'BibleManager.get_verses("reflist: %s")', reflist)
|
log.debug(u'BibleManager.get_verses("reflist: %s")', reflist)
|
||||||
en_reflist = []
|
en_reflist = []
|
||||||
|
Loading…
Reference in New Issue
Block a user