From a0139970cf4a250e86068b324f34b51208fe88ae Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Tue, 6 Feb 2024 15:58:54 +0100 Subject: [PATCH] no message --- be/app/Http/Controllers/SubTaskController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/be/app/Http/Controllers/SubTaskController.php b/be/app/Http/Controllers/SubTaskController.php index 0801a1e..35fc9e8 100644 --- a/be/app/Http/Controllers/SubTaskController.php +++ b/be/app/Http/Controllers/SubTaskController.php @@ -176,6 +176,9 @@ class SubTaskController extends Controller // syncnutie timeblocks foreach ( $request->all()['data']['employees'] as $key => $employee ) { + if (!isset($data['data']['employees'][$key]['timeblocks']) || $data['data']['employees'][$key]['timeblocks'] == null) + continue; + if ($data['data']['employees'][$key]['user_id'] == $employee['id']) $subtasks[$key]->syncTimeblocks($data['data']['employees'][$key]['timeblocks']); }