diff -r c9f1111e0ee8 -r 65bb21409292 server/sources/native.py --- a/server/sources/native.py Mon Sep 15 17:23:22 2014 +0200 +++ b/server/sources/native.py Mon Sep 15 10:06:07 2014 +0200 @@ -1017,14 +1017,16 @@ sql = self.sqlgen.select('tx_entity_actions', restr, ('txa_action', 'txa_public', 'txa_order', 'etype', 'eid', 'changes')) - cu = self.doexec(cnx, sql, restr) - actions = [tx.EntityAction(a,p,o,et,e,c and loads(self.binary_to_str(c))) - for a,p,o,et,e,c in cu.fetchall()] + with cnx.ensure_cnx_set: + cu = self.doexec(cnx, sql, restr) + actions = [tx.EntityAction(a,p,o,et,e,c and loads(self.binary_to_str(c))) + for a,p,o,et,e,c in cu.fetchall()] sql = self.sqlgen.select('tx_relation_actions', restr, ('txa_action', 'txa_public', 'txa_order', 'rtype', 'eid_from', 'eid_to')) - cu = self.doexec(cnx, sql, restr) - actions += [tx.RelationAction(*args) for args in cu.fetchall()] + with cnx.ensure_cnx_set: + cu = self.doexec(cnx, sql, restr) + actions += [tx.RelationAction(*args) for args in cu.fetchall()] return sorted(actions, key=lambda x: x.order) def undo_transaction(self, cnx, txuuid):