server/hooks.py
branchstable
changeset 2908 1c42a9826dd4
parent 2745 0dafa29ace1f
child 2909 e695b7b0359d
--- a/server/hooks.py	Tue Aug 18 14:27:27 2009 +0200
+++ b/server/hooks.py	Tue Aug 18 15:50:46 2009 +0200
@@ -438,7 +438,9 @@
             isrset = session.unsafe_execute('Any S WHERE ET initial_state S, ET name %(etype)s',
                                             {'etype': etype})
             if isrset and not toeid == isrset[0][0]:
-                msg = session._('not the initial state for this entity')
+                _ = session._
+                msg = _('%s is not the initial state (%s) for this entity') % (
+                    _(session.entity_from_eid(toeid).name), _(isrset.get_entity(0,0).name))
                 raise ValidationError(fromeid, {'in_state': msg})
     eschema = session.repo.schema[etype]
     if not 'wf_info_for' in eschema.object_relations():