diff -r 21468682f688 -r d7f5d873e1b8 server/session.py --- a/server/session.py Wed Oct 06 11:57:21 2010 +0200 +++ b/server/session.py Wed Oct 06 14:04:26 2010 +0200 @@ -31,7 +31,7 @@ from rql.nodes import ETYPE_PYOBJ_MAP, etype_from_pyobj from yams import BASE_TYPES -from cubicweb import Binary, UnknownEid, schema +from cubicweb import Binary, UnknownEid, QueryError, schema from cubicweb.req import RequestSessionBase from cubicweb.dbapi import ConnectionProperties from cubicweb.utils import make_uid, RepeatList @@ -738,7 +738,10 @@ self._touch() self.debug('commit session %s done (no db activity)', self.id) return - if self.commit_state: + cstate = self.commit_state + if cstate == 'uncommitable': + raise QueryError('transaction must be rollbacked') + if cstate is not None: return # on rollback, an operation should have the following state # information: