Fix bug when modifying server descriptions
This commit is contained in:
parent
faaf27632c
commit
d3dba3fcf9
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ class UpdateServerDetailsRequest extends ServerWriteRequest
|
||||||
return [
|
return [
|
||||||
'name' => $rules['name'],
|
'name' => $rules['name'],
|
||||||
'user' => $rules['owner_id'],
|
'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, [
|
$response = $this->repository->setFreshModel($this->getUpdatedModel())->update($server->id, [
|
||||||
'owner_id' => array_get($data, 'owner_id'),
|
'owner_id' => array_get($data, 'owner_id'),
|
||||||
'name' => array_get($data, 'name'),
|
'name' => array_get($data, 'name'),
|
||||||
'description' => array_get($data, 'description', ''),
|
'description' => array_get($data, 'description') ?? '',
|
||||||
], true, true);
|
], true, true);
|
||||||
|
|
||||||
if ((int) array_get($data, 'owner_id', 0) !== (int) $server->owner_id) {
|
if ((int) array_get($data, 'owner_id', 0) !== (int) $server->owner_id) {
|
||||||
|
|
Loading…
Reference in a new issue