Fix bug when modifying server descriptions
This commit is contained in:
parent
faaf27632c
commit
d3dba3fcf9
|
@ -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']),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue