server/hooks.py
branchstable
changeset 3773 14fde27a70a2
parent 3693 92581287726f
child 3859 85e6ba89837a
--- a/server/hooks.py	Wed Oct 21 14:39:26 2009 +0200
+++ b/server/hooks.py	Wed Oct 21 15:12:29 2009 +0200
@@ -13,7 +13,7 @@
 from cubicweb import UnknownProperty, ValidationError, BadConnectionId
 from cubicweb.schema import RQLVocabularyConstraint
 from cubicweb.server.pool import Operation, LateOperation, PreCommitOperation
-from cubicweb.server.hookhelper import (check_internal_entity, 
+from cubicweb.server.hookhelper import (check_internal_entity,
                                         get_user_sessions, rproperty)
 from cubicweb.server.repository import FTIndexEntityOp
 
@@ -519,8 +519,8 @@
             msg = session._('mandatory relation')
             raise ValidationError(entity.eid, {'by_transition': msg})
         deststate = wf.state_by_eid(deststateeid)
-        if not cowpowers and deststate is None:
-            msg = entity.req._("state doesn't belong to entity's workflow")
+        if deststate is None:
+            msg = entity.req._("state doesn't belong to entity's current workflow")
             raise ValidationError(entity.eid, {'to_state': msg})
     else:
         # check transition is valid and allowed, unless we're coming back from