mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
perf: 优化子任务读取失败
This commit is contained in:
parent
0d23b973de
commit
050c9702d8
@ -1278,7 +1278,9 @@ class ProjectTask extends AbstractModel
|
||||
// 标记已完成
|
||||
if ($this->parent_id == 0) {
|
||||
if (self::whereParentId($this->id)->whereCompleteAt(null)->exists()) {
|
||||
throw new ApiException('子任务未完成');
|
||||
throw new ApiException('子任务未完成', [
|
||||
'task_id' => $this->id
|
||||
], -4004);
|
||||
}
|
||||
}
|
||||
if (!$this->hasOwner()) {
|
||||
|
||||
2
resources/assets/js/store/actions.js
vendored
2
resources/assets/js/store/actions.js
vendored
@ -214,6 +214,8 @@ export default {
|
||||
dispatch("forgetTask", data.task_id)
|
||||
} else if (ret === -4003) {
|
||||
dispatch("forgetDialog", data.dialog_id)
|
||||
} else if (ret === -4004) {
|
||||
dispatch("getTaskForParent", data.task_id).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user