* Fix batch create child task error.

This commit is contained in:
caoyanyi
2023-08-28 11:22:46 +08:00
parent 04e48ed2c8
commit bc4ca51f48
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -105,11 +105,10 @@ class taskModel extends model
public function afterBatchCreate(array $taskIdList, int $parentID = 0): bool
{
/* Process other data after split task. */
if($parentID && empty($taskIdList))
if($parentID && !empty($taskIdList))
{
$childrenIdList = !empty($parentID) ? $taskIdList : array();
$parentTask = $this->getByID($parentID);
$this->afterSplitTask($parentTask, $childrenIdList);
$parentTask = $this->taskTao->fetchByID($parentID);
$this->afterSplitTask($parentTask, $taskIdList);
}
return !dao::isError();