Don't trigger a 500 error due to unchecked data being inserted; closes #2087
This also clears up allowed values for the disk input and normalizes the messaging between edit and create screens.
This commit is contained in:
parent
497f73d820
commit
4a0627d182
4 changed files with 20 additions and 14 deletions
|
@ -71,8 +71,8 @@ class BuildModificationService
|
|||
* @return \Pterodactyl\Models\Server
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
*/
|
||||
public function handle(Server $server, array $data)
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ class BuildModificationService
|
|||
}
|
||||
}
|
||||
|
||||
/** @var \Pterodactyl\Models\Server $server */
|
||||
/* @var \Pterodactyl\Models\Server $server */
|
||||
$server = $this->repository->withFreshModel()->update($server->id, [
|
||||
'oom_disabled' => array_get($data, 'oom_disabled'),
|
||||
'memory' => array_get($data, 'memory'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue