← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~meths/openlp/trivialfixes into lp:openlp

 

Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/46400

Fix local bible quick search.
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/46400
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py	2011-01-15 19:44:31 +0000
+++ openlp/plugins/bibles/lib/db.py	2011-01-15 23:24:11 +0000
@@ -340,11 +340,11 @@
         verse_list = []
         for book, chapter, start_verse, end_verse in reference_list:
             db_book = self.get_book(book)
-            if end_verse == -1:
-                end_verse = self.get_verse_count(book, chapter)
             if db_book:
                 book = db_book.name
                 log.debug(u'Book name corrected to "%s"', book)
+                if end_verse == -1:
+                    end_verse = self.get_verse_count(book, chapter)
                 verses = self.session.query(Verse)\
                     .filter_by(book_id=db_book.id)\
                     .filter_by(chapter=chapter)\