mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 10:14:47 +00:00
fix: do not allow to delete env if a resource is defined
This commit is contained in:
1 parent
554222abc7
commit
8bfc1a7c06
4 files changed
+12
-12
No files matched your search
@@ -12,7 +12,7 @@ class Environment extends Model
|
||||
'project_id',
|
||||
];
|
||||
|
||||
public function can_delete_environment()
|
||||
public function isEmpty()
|
||||
{
|
||||
return $this->applications()->count() == 0 &&
|
||||
$this->redis()->count() == 0 &&
|
||||
|
||||
@@ -18,7 +18,7 @@ class Project extends BaseModel
|
||||
'project_id' => $project->id,
|
||||
]);
|
||||
Environment::create([
|
||||
'name' => 'Production',
|
||||
'name' => 'production',
|
||||
'project_id' => $project->id,
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user