From 2f346ee450310fd117f690d02b40920d8be680be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Tue, 26 Apr 2011 20:55:13 +0200 Subject: [PATCH] small changes --- openlp/plugins/bibles/lib/db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 8e0eec849..feeeb9b4f 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -78,7 +78,7 @@ def init_schema(url): book_table = Table(u'book', metadata, Column(u'id', types.Integer, primary_key=True), - Column(u'book_reference_id', types.Integer), + Column(u'book_reference_id', types.Integer, index=True), Column(u'testament_reference_id', types.Integer), Column(u'name', types.Unicode(50), index=True), ) @@ -428,7 +428,7 @@ class BibleDB(QtCore.QObject, Manager): """ log.debug(u'BibleDB.get_chapter_count("%s")', book.name) count = self.session.query(Verse.chapter).join(Book)\ - .filter(Book.name==book.name)\ + .filter(Book.book_reference_id==book.book_reference_id)\ .distinct().count() if not count: return 0