From 4a84c7238ab3e3ebf1bc640eb359c04c463594d6 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 28 Sep 2023 11:51:01 +0200 Subject: [PATCH] fix: cannot delete env with available services --- app/Models/Environment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Environment.php b/app/Models/Environment.php index 470ad5e6c..624787ba6 100644 --- a/app/Models/Environment.php +++ b/app/Models/Environment.php @@ -14,7 +14,7 @@ class Environment extends Model public function can_delete_environment() { - return $this->applications()->count() == 0 && $this->postgresqls()->count() == 0; + return $this->applications()->count() == 0 && $this->postgresqls()->count() == 0 && $this->services()->count() == 0; } public function applications()