Compare commits

..

No commits in common. "master" and "v0.3.3" have entirely different histories.

2 changed files with 4 additions and 6 deletions

View file

@ -69,13 +69,13 @@ class VersionTestCase(DataTestCase):
continuum.versioning_manager.transaction_cls = continuum.TransactionFactory() continuum.versioning_manager.transaction_cls = continuum.TransactionFactory()
self.teardown_db() self.teardown_db()
def make_config(self, files=None, **kwargs): def make_config(self, **kwargs):
""" """
Make and customize the config object. Make and customize the config object.
We override this to explicitly enable the versioning feature. We override this to explicitly enable the versioning feature.
""" """
config = super().make_config(files=files, **kwargs) config = super().make_config(**kwargs)
config.setdefault("wutta_continuum.enable_versioning", "true") config.setdefault("wutta_continuum.enable_versioning", "true")
# nb. must purge model classes from sys.modules, so they will # nb. must purge model classes from sys.modules, so they will

View file

@ -123,7 +123,7 @@ def model_transaction_query(instance, session=None, model_class=None, joins=None
query = query.outerjoin(*join_args) query = query.outerjoin(*join_args)
# we'll collect "filter conditions" for use below... # we'll collect "filter conditions" for use below...
conditions = [vercls.uuid != None] # pylint: disable=singleton-comparison conditions = [vercls.uuid != None]
# add join/filter for each requested by caller # add join/filter for each requested by caller
for child_class, foreign_attr, primary_attr in joins: for child_class, foreign_attr, primary_attr in joins:
@ -138,9 +138,7 @@ def model_transaction_query(instance, session=None, model_class=None, joins=None
) )
# and add the filter condition for use below... # and add the filter condition for use below...
conditions.append( conditions.append(foreign_attr != None)
foreign_attr != None # pylint: disable=singleton-comparison
)
# at this point we have *outer* joined on *all* version tables # at this point we have *outer* joined on *all* version tables
# involved, but that means basically "all transactions" will # involved, but that means basically "all transactions" will