|
@@ -16,7 +16,8 @@ class WorkflowBaseAdmin extends BaseAdmin
|
|
|
|
|
|
$workflows = $this->getRepository('WorkflowBundle:Workflow')->findAllByClass($this->getClass());
|
|
|
foreach ($workflows as $workflow) {
|
|
|
- $transitions = $workflow->getDefinition($workflow->getSubject())->getTransitions();
|
|
|
+ $definition = $workflow->getDefinition($workflow->getSubject());
|
|
|
+ $transitions = $definition ? $definition->getTransitions() : array();
|
|
|
foreach ($transitions as $key => $transition) {
|
|
|
$actions[$key] = array(
|
|
|
'label' => $this->trans('workflow.' . $workflow->getName() . '.transitions.' . $transition->getName(), array(), 'WorkflowLabel'),
|