fix chat_department as object

This commit is contained in:
amazuecos
2024-12-04 18:31:18 +01:00
parent 16cec58431
commit ea4d4327b7
2 changed files with 5 additions and 5 deletions

View File

@ -265,7 +265,7 @@ class Users extends \App\Controllers\GoBaseController
foreach ($chatDepartments as $chatDepartment) {
$this->chat_department_user_model->insert([
"user_id" => $id,
"chat_department_id" => $this->chat_department_model->where("name", $chatDepartment)->first()["id"]
"chat_department_id" => $this->chat_department_model->where("name", $chatDepartment)->first()->id
]);
}
$id = $user->id ?? $id;