more helpful error message stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Mon, 16 Nov 2009 15:36:06 +0100
branchstable
changeset 3859 85e6ba89837a
parent 3858 ba96e4607e67
child 3861 535db4d4ff57
more helpful error message
server/hooks.py
--- a/server/hooks.py	Mon Nov 16 14:47:47 2009 +0100
+++ b/server/hooks.py	Mon Nov 16 15:36:06 2009 +0100
@@ -531,7 +531,8 @@
                 msg = session._("transition doesn't belong to entity's workflow")
                 raise ValidationError(entity.eid, {'by_transition': msg})
             if not tr.has_input_state(fromstate):
-                msg = session._("transition isn't allowed")
+                _ = session._
+                msg = _("transition %s isn't allowed from %s") % (_(tr.name), _(fromstate.name))
                 raise ValidationError(entity.eid, {'by_transition': msg})
             if not tr.may_be_fired(foreid):
                 msg = session._("transition may not be fired")