small fixes

This commit is contained in:
Phill Ridout 2015-02-12 21:24:39 +00:00
parent 08e1404ffb
commit b427e216f1
2 changed files with 1 additions and 4 deletions

View File

@ -384,8 +384,6 @@ class Manager(object):
:param object_class: The type of objects to return.
:param filter_clause: The filter governing selection of objects to return. Defaults to None.
"""
if not self.session:
return
query = self.session.query(object_class)
if filter_clause is not None:
query = query.filter(filter_clause)

View File

@ -145,8 +145,7 @@ class BibleDB(QtCore.QObject, Manager, RegistryProperties):
if 'file' in kwargs:
self.file = kwargs['file']
Manager.__init__(self, 'bibles', init_schema, self.file, upgrade)
if self.session:
if 'file' in kwargs:
if self.session and 'file' in kwargs:
self.get_name()
if 'path' in kwargs:
self.path = kwargs['path']