diff --git a/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php b/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php index 011293b76..4b75138b9 100644 --- a/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php +++ b/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php @@ -18,7 +18,7 @@ class UpdateServerDetailsRequest extends ServerWriteRequest return [ 'name' => $rules['name'], 'user' => $rules['owner_id'], - 'description' => $rules['description'], + 'description' => array_merge(['nullable'], $rules['description']), ]; } diff --git a/app/Services/Servers/DetailsModificationService.php b/app/Services/Servers/DetailsModificationService.php index cabebf254..78d8eb31e 100644 --- a/app/Services/Servers/DetailsModificationService.php +++ b/app/Services/Servers/DetailsModificationService.php @@ -71,7 +71,7 @@ class DetailsModificationService $response = $this->repository->setFreshModel($this->getUpdatedModel())->update($server->id, [ 'owner_id' => array_get($data, 'owner_id'), 'name' => array_get($data, 'name'), - 'description' => array_get($data, 'description', ''), + 'description' => array_get($data, 'description') ?? '', ], true, true); if ((int) array_get($data, 'owner_id', 0) !== (int) $server->owner_id) {