Commit e8729562 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[wf] oops, BaseTransition.__init__ may be called for subclasses

--HG--
branch : 3.5
parent d0b77dd27740
......@@ -198,6 +198,7 @@ class WorkflowTC(EnvBasedTC):
self.assertEquals(len(transitions), 1)
self.assertEquals(transitions[0].name, 'tr1')
class CustomWorkflowTC(EnvBasedTC):
def setup_database(self):
......
......@@ -124,7 +124,9 @@ class BaseTransition(AnyEntity):
fetch_attrs, fetch_order = fetch_config(['name'])
def __init__(self, *args, **kwargs):
raise Exception('should not be instantiated')
if self.id == 'BaseTransition':
raise Exception('should not be instantiated')
super(BaseTransition, self).__init__(*args, **kwargs)
def may_be_fired(self, eid):
"""return true if the logged user may fire this transition
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment