# HG changeset patch # User Aurelien Campeas # Date 1254995899 -7200 # Node ID 9036a8fbbd57bbf19fa1de9c560e0a50c64e6101 # Parent 600ee58a1375a16e26926ad43177f0baf56f8347 add a commit point, a new transition exhibits the problem again diff -r 600ee58a1375 -r 9036a8fbbd57 entities/test/unittest_wfobjs.py --- a/entities/test/unittest_wfobjs.py Thu Oct 08 11:44:06 2009 +0200 +++ b/entities/test/unittest_wfobjs.py Thu Oct 08 11:58:19 2009 +0200 @@ -173,15 +173,19 @@ created = twf.add_state(_('created'), initial=True) identified = twf.add_state(_('identified')) released = twf.add_state(_('released')) + closed = twf.add_state(_('closed')) twf.add_wftransition(_('identify'), subwf, (created,), [(xsigned, identified), (xaborted, created)]) twf.add_wftransition(_('release'), subwf, (identified,), [(xsigned, released), (xaborted, identified)]) + twf.add_wftransition(_('close'), subwf, (released,), + [(xsigned, closed), (xaborted, released)]) self.commit() group = self.add_entity('CWGroup', name=u'grp1') self.commit() - for trans in ('identify', 'release'): + for trans in ('identify', 'release', 'close'): group.fire_transition(trans) + self.commit() def test_subworkflow_base(self): """subworkflow diff -r 600ee58a1375 -r 9036a8fbbd57 etwist/server.py --- a/etwist/server.py Thu Oct 08 11:44:06 2009 +0200 +++ b/etwist/server.py Thu Oct 08 11:58:19 2009 +0200 @@ -167,7 +167,7 @@ datadir = self.config.locate_resource(segments[1]) if datadir is None: return None, [] - self.info('static file %s from %s', segments[-1], datadir) + #self.info('static file %s from %s', segments[-1], datadir) if segments[0] == 'data': return static.File(str(datadir)), segments[1:] else: diff -r 600ee58a1375 -r 9036a8fbbd57 server/hooks.py --- a/server/hooks.py Thu Oct 08 11:44:06 2009 +0200 +++ b/server/hooks.py Thu Oct 08 11:58:19 2009 +0200 @@ -520,6 +520,7 @@ raise ValidationError(entity.eid, {'by_transition': msg}) if not tr.has_input_state(fromstate): msg = session._("transition isn't allowed") + print tr.name, fromstate.name, entity.by_transition raise ValidationError(entity.eid, {'by_transition': msg}) if not tr.may_be_fired(foreid): msg = session._("transition may not be fired")