diff --git a/sqlalchemy_continuum/manager.py b/sqlalchemy_continuum/manager.py index 766780e9..641e9521 100644 --- a/sqlalchemy_continuum/manager.py +++ b/sqlalchemy_continuum/manager.py @@ -32,7 +32,7 @@ def wrapper(self, mapper, connection, target): uow = self.unit_of_work(session) break # The ConnectionFairy is the same, this connection is a clone else: - raise KeyError + raise return func(self, uow, target) return wrapper @@ -400,7 +400,7 @@ def append_association_operation(self, conn, table_name, params, op): uow = self.unit_of_work(conn.session) break # The ConnectionFairy is the same, this connection is a clone else: - raise KeyError + raise uow.pending_statements.append(stmt) def track_cloned_connections(self, c, opt):