Commit 28439d7d authored by Papa Tamsir Kane's avatar Papa Tamsir Kane Committed by Papa Tamsir Kane

erp5_decision: Do not crash when source decision is not indicated in business process

parent 3a1c9eb5
......@@ -12,7 +12,10 @@ if isTransitionPossible(decision, 'post'):
# set some meaningful title
action_type = 'Approval'
title = '%s by %s' %(action_type, source_decision_value.getTitle())
decision.setTitle(title)
if source_decision_value is None:
decision.setTitle(action_type)
else:
title = '%s by %s' %(action_type, source_decision_value.getTitle())
decision.setTitle(title)
decision.post()
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