fix: generate fqdn if you deleted a service app, but it requires fqdn

This commit is contained in:
Andras Bacsai 2023-10-17 10:37:39 +02:00
parent 16cbca36c1
commit fbb5f2ca2e

View File

@ -382,7 +382,7 @@ class Service extends BaseModel
$value = Str::of($variable);
}
if ($key->startsWith('SERVICE_FQDN')) {
if ($isNew) {
if ($isNew || $savedService->fqdn === null) {
$name = $key->after('SERVICE_FQDN_')->beforeLast('_')->lower();
$fqdn = generateFqdn($this->server, "{$name->value()}-{$this->uuid}");
if (substr_count($key->value(), '_') === 3) {