From bbcc04aec5f0b8aabbeaa4aee13b0ef610a244da Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 4 May 2017 19:59:37 +1000 Subject: [PATCH] fix for client_id (#1475) --- app/Ninja/Repositories/TaskRepository.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Ninja/Repositories/TaskRepository.php b/app/Ninja/Repositories/TaskRepository.php index b3f4a51156..a0b66d5bab 100644 --- a/app/Ninja/Repositories/TaskRepository.php +++ b/app/Ninja/Repositories/TaskRepository.php @@ -134,6 +134,10 @@ class TaskRepository extends BaseRepository $timeLog = []; } + if(isset($data['client_id'])) { + $task->client_id = Client::getPrivateId($data['client_id']); + } + array_multisort($timeLog); if (isset($data['action'])) { @@ -148,7 +152,6 @@ class TaskRepository extends BaseRepository $task->is_running = false; } elseif ($data['action'] == 'offline'){ $task->is_running = $data['is_running'] ? 1 : 0; - $task->client_id = $data['client_id']; } }