diff -r 8f2786492369 -r c2bc0b804982 server/session.py --- a/server/session.py Mon Mar 25 16:13:34 2013 +0100 +++ b/server/session.py Mon Mar 25 16:12:39 2013 +0100 @@ -290,6 +290,14 @@ """ return eid in self.data.get('neweids', ()) + # Operation management #################################################### + + def add_operation(self, operation, index=None): + """add an operation to be executed at the end of the transaction""" + if index is None: + self.pending_operations.append(operation) + else: + self.pending_operations.insert(index, operation) @@ -1216,13 +1224,7 @@ transaction_data = tx_attr('data') pending_operations = tx_attr('pending_operations') pruned_hooks_cache = tx_attr('pruned_hooks_cache') - - def add_operation(self, operation, index=None): - """add an operation""" - if index is None: - self.pending_operations.append(operation) - else: - self.pending_operations.insert(index, operation) + add_operation = tx_meth('add_operation') # undo support ############################################################