• Vincent Pelletier's avatar
    ERP5Type.mixin.component: Do not fail when workflow_history is not present. · e1f60932
    Vincent Pelletier authored
    workflow_history attribute may not exist on bootstrapping (constructInstance),
    which leads AttributeError exception, which could have further side-effects
    as this is called during dynamic class initialisation.
    Also, original code from CMFCore.WorkflowTool, from which this code is
    derived for bootstrap reasons, catches KeyError (when history exists,
    just not for considered workflow), so follow the same pattern.
    Laslty, also catch IndexError in case the workflow history entry would
    exist empty - which would be the sign of a broken workflow history.
    e1f60932
component.py 16.2 KB