Commit 7920c111 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

check the existence of workflow_history to avoid possible AttributeError.

parent 33831bf1
......@@ -97,8 +97,10 @@ class BusinessConfiguration(Item):
def initializeWorkflow(self):
""" Initialize Related Workflow"""
workflow = self.getResourceValue()
workflow_history = getattr(self, 'workflow_history', None)
if workflow is not None and \
(self.getResource() not in self.workflow_history):
workflow_history is not None and \
(self.getResource() not in workflow_history):
if len(self.objectValues("ERP5 Configuration Save")) > 0:
raise ValueError("Business Configuration Cannot be initialized, \
it contains one or more Configurator Save")
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