[Repoze-dev] [issue96] Recursion error in workflow.state_of

2009-08-30 Thread mstarzyk
New submission from mstarzyk mstar...@gmail.com: Hi, Calling Workflow.state_of(content) within the callback on workflow initialization causes recursion error. See the test case below: from repoze.workflow import Workflow class Content(object): state = None def new_state(content, info):

[Repoze-dev] [issue96] Recursion error in workflow.state_of

2009-08-30 Thread Chris McDonough
Chris McDonough chr...@plope.com added the comment: Thanks for the report! I think the only suggestion I can make about this is don't do that. Instead, check the callback info sent in as the second argument to determine which transition is happening. The callback info's transition will be {}