[workflow] better crash on programming error than silently swallow things (needs review)
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 13 Mar 2009 11:07:16 +0100
changeset 1114 b91c7a7e8cb0
parent 1113 5608c79c789b
child 1115 1a9e386ebdda
[workflow] better crash on programming error than silently swallow things (needs review)
common/mixins.py
--- a/common/mixins.py	Fri Mar 13 11:06:21 2009 +0100
+++ b/common/mixins.py	Fri Mar 13 11:07:16 2009 +0100
@@ -192,6 +192,7 @@
         """change the entity's state according to a state defined in given
         parameters
         """
+        assert not isinstance(stateeid, basestring), 'change_state wants a state eid'
         if trcomment:
             self.req.set_shared_data('trcomment', trcomment)
         if trcommentformat: