summaryrefslogtreecommitdiff
path: root/app/Model/SubtaskModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-03-19 16:45:32 -0400
committerFrederic Guillot <fred@kanboard.net>2017-03-19 16:45:32 -0400
commitd915c2a96b0cbb54b9949cc04495d156e1f89332 (patch)
tree93f31d3de295c0f6cfc7c3a3bdf20cb8d7e7922a /app/Model/SubtaskModel.php
parent5b7ed28ba1a47a5c4312017a86fb811e14c0285a (diff)
Improve subtask toggle
Diffstat (limited to 'app/Model/SubtaskModel.php')
-rw-r--r--app/Model/SubtaskModel.php5
1 files changed, 3 insertions, 2 deletions
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));
}
}