Fix bug with server default ports not being updated properly
This commit is contained in:
parent
81d265db08
commit
dcab84b1da
1 changed files with 3 additions and 2 deletions
|
@ -535,7 +535,7 @@ class ServerRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
$newPorts = true;
|
$newPorts = true;
|
||||||
$firstNewAllocation = (is_null($firstNewAllocation)) ? $model->id : $firstNewAllocation;
|
$firstNewAllocation = $firstNewAllocation ?? $model;
|
||||||
$model->update([
|
$model->update([
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
]);
|
]);
|
||||||
|
@ -555,7 +555,8 @@ class ServerRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
// New Allocation, set as the default.
|
// New Allocation, set as the default.
|
||||||
$server->allocation_id = $firstNewAllocation;
|
$server->allocation_id = $firstNewAllocation->id;
|
||||||
|
$newBuild['default'] = ['ip' => $firstNewAllocation->ip, 'port' => $firstNewAllocation->port];
|
||||||
}
|
}
|
||||||
|
|
||||||
$newPorts = true;
|
$newPorts = true;
|
||||||
|
|
Loading…
Reference in a new issue