← 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)


A change in symantics breaks some checks when passing expression clauses around with 0.6 so the tests have to be explicit.  Fixes bug #611889.

Please check that 0.5 users aren't broken as I couldn't check once I upgraded!
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/31507
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/lib/db.py'
--- openlp/core/lib/db.py	2010-07-27 09:32:52 +0000
+++ openlp/core/lib/db.py	2010-08-02 03:04:42 +0000
@@ -199,7 +199,7 @@
             Any parameters to order the returned objects by.  Defaults to None.
         """
         query = self.session.query(object_class)
-        if filter_clause:
+        if filter_clause is not None:
             query = query.filter(filter_clause)
         if order_by_ref is not None:
             return query.order_by(order_by_ref).all()
@@ -237,7 +237,7 @@
         """
         try:
             query = self.session.query(object_class)
-            if filter_clause:
+            if filter_clause is not None:
                 query = query.filter(filter_clause)
             query.delete(synchronize_session=False)
             self.session.commit()


Follow ups