Changeset - f841edbe4b44
[Not reviewed]
0 1 0
Lance Edgar (lance) - 2 months ago 2024-08-23 20:33:21
lance@edbob.org
fix: tweak how versioning is configured and confirmed

to allow for adding this to a wutta-native app
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rattail/db/config.py
Show inline comments
 
@@ -74,7 +74,7 @@ def configure_versioning(config, force=False, manager=None, plugins=None, **kwar
 
    """
 
    Configure Continuum versioning.
 
    """
 
    if not config.versioning_enabled() and not force:
 
    if not (force or config.versioning_enabled()):
 
        return
 

	
 
    try:
 
@@ -96,9 +96,9 @@ def configure_versioning(config, force=False, manager=None, plugins=None, **kwar
 
        # TODO: is this the best way/place to confirm versioning?
 
        app = config.get_app()
 
        try:
 
            model = app.model
 
            from rattail.db.model import User
 
            configure_mappers()
 
            transaction_class = continuum.transaction_class(model.User)
 
            transaction_class = continuum.transaction_class(User)
 
            config.versioning_has_been_enabled = True
 
        except continuum.ClassNotVersioned:
 
            raise RuntimeError("Versioning is enabled and configured, but is not functional!  "
0 comments (0 inline, 0 general)