From 828ecc6803059955dff0eb1e0dfa780c590de813 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 22 May 2023 09:53:31 +0200 Subject: [PATCH] fix --- app/Models/ApplicationSetting.php | 12 +++++++----- .../livewire/project/application/general.blade.php | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Models/ApplicationSetting.php b/app/Models/ApplicationSetting.php index b447cf948..c0beabe7c 100644 --- a/app/Models/ApplicationSetting.php +++ b/app/Models/ApplicationSetting.php @@ -16,12 +16,14 @@ class ApplicationSetting extends Model { return Attribute::make( set: function ($value) { - if ($value) { - $this->application->ports_exposes = '80'; - } else { - $this->application->ports_exposes = '3000'; + if (is_null($this->application->ports_exposes)) { + if ($value) { + $this->application->ports_exposes = '80'; + } else { + $this->application->ports_exposes = '3000'; + } + $this->application->save(); } - $this->application->save(); return $value; } ); diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php index 611877265..501803932 100644 --- a/resources/views/livewire/project/application/general.blade.php +++ b/resources/views/livewire/project/application/general.blade.php @@ -55,7 +55,7 @@ - + {{-- --}} {{--