Replace unique uuid single call
This commit is contained in:
parent
3e405b626b
commit
679a25a763
3 changed files with 2 additions and 14 deletions
|
@ -206,8 +206,9 @@ class ServerCreationService
|
|||
private function generateUniqueUuidCombo(): string
|
||||
{
|
||||
$uuid = Uuid::uuid4()->toString();
|
||||
$shortUuid = substr($uuid, 0, 8);
|
||||
|
||||
if (!$this->repository->isUniqueUuidCombo($uuid, substr($uuid, 0, 8))) {
|
||||
if (!Server::query()->where('uuid', $uuid)->orWhere('uuidShort', $shortUuid)->exists()) {
|
||||
return $this->generateUniqueUuidCombo();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue