Skip to content

Commit

Permalink
ignore NotEnabledTransitionException
Browse files Browse the repository at this point in the history
  • Loading branch information
orlyapps authored Mar 24, 2022
1 parent a952a6e commit dda8007
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Actions/WorkflowAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ public function uriKey()
public function handle(ActionFields $fields, Collection $models)
{
foreach ($models as $model) {
$workflow = \Workflow::get($model, \Str::lower(class_basename($model)));
$workflow->apply($model, request()->transition);
$model->save();
try {
$workflow = \Workflow::get($model, \Str::lower(class_basename($model)));
$workflow->apply($model, request()->transition);
$model->save();
} catch (\Throwable $th) {
//throw $th;
}

}
}

Expand Down

0 comments on commit dda8007

Please sign in to comment.