From c6d85a1b0bb15102a4f1c1e1d15e6633be342996 Mon Sep 17 00:00:00 2001 From: spencerrlongg Date: Tue, 20 Feb 2024 12:23:24 -0600 Subject: [PATCH] allows arrays on checkbox values --- app/Http/Controllers/Api/AssetsController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 6ef3b30503..dbeb1b6c63 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -663,6 +663,11 @@ class AssetsController extends Controller $asset->{$field->db_column} = \Crypt::encrypt($request->input($field->db_column)); } } else { + if ($field->element == 'checkbox') { + if(is_array($field_val)) { + $field_val = implode(',', $field_val); + } + } $asset->{$field->db_column} = $request->input($field->db_column); } }