From d915c2a96b0cbb54b9949cc04495d156e1f89332 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 19 Mar 2017 16:45:32 -0400 Subject: Improve subtask toggle --- app/Model/SubtaskModel.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Model/SubtaskModel.php') diff --git a/app/Model/SubtaskModel.php b/app/Model/SubtaskModel.php index 9d047d90..40cb517d 100644 --- a/app/Model/SubtaskModel.php +++ b/app/Model/SubtaskModel.php @@ -218,10 +218,11 @@ class SubtaskModel extends Base $result = $this->db->table(self::TABLE)->eq('id', $values['id'])->save($values); if ($result) { - $this->subtaskTimeTrackingModel->updateTaskTimeTracking($values['task_id']); + $subtask = $this->getById($values['id']); + $this->subtaskTimeTrackingModel->updateTaskTimeTracking($subtask['task_id']); if ($fireEvent) { - $this->queueManager->push($this->subtaskEventJob->withParams($values['id'], self::EVENT_UPDATE, $values)); + $this->queueManager->push($this->subtaskEventJob->withParams($subtask['id'], self::EVENT_UPDATE, $values)); } } -- cgit v1.2.3