fix: 任务流转会出错

This commit is contained in:
kuaifan 2022-01-13 18:39:57 +08:00
parent 7dcd8b29fc
commit ac6b90c986

View File

@ -512,7 +512,7 @@ class ProjectTask extends AbstractModel
// 判断符合流转
$currentFlowItem = ProjectFlowItem::find($this->flow_item_id);
if ($currentFlowItem) {
if (!in_array($currentFlowItem->id, $newFlowItem->turns)) {
if (!in_array($newFlowItem->id, $currentFlowItem->turns)) {
throw new ApiException("当前状态[{$currentFlowItem->name}]不可流转到[{$newFlowItem->name}]");
}
if ($currentFlowItem->userlimit) {