From 72c2336d84bda1ea503439f9b642eb748b87d9b0 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 2 Aug 2010 03:53:14 +0100 Subject: [PATCH] Work with SQLAlchemy 0.6 (Bug #611889) --- openlp/core/lib/db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/lib/db.py b/openlp/core/lib/db.py index f97a74dc8..972d849a3 100644 --- a/openlp/core/lib/db.py +++ b/openlp/core/lib/db.py @@ -199,7 +199,7 @@ class Manager(object): 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 @@ class Manager(object): """ 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()