Skip to content

product/Workflow&erp5_workflow_test: fix can't access workflow state after change State Variable

Xiaowu Zhang requested to merge xiaowu.zhang/erp5:dev into master

we have such error:

....
if context.getValidationState() in ["draft", "deleted", "cancelled", "archived"]:
  Module Products.ERP5Type.Accessor.WorkflowState, line 60, in __call__
    return wf._getWorkflowStateOf(instance, id_only=1)
  Module Products.ERP5Type.Core.Workflow, line 609, in _getWorkflowStateOf
    state_id = 'state_' + status.get(self.getStateVariable(), None)
TypeError: cannot concatenate 'str' and 'NoneType' objects
Edited by Xiaowu Zhang

Merge request reports