fix: remove coolify labels from ui

This commit is contained in:
Andras Bacsai
2023-10-27 11:23:29 +02:00
parent 4f543ce20f
commit 0b88cd69f2
4 changed files with 9 additions and 4 deletions

View File

@@ -686,7 +686,12 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$environment_variables = $this->generate_environment_variables($ports);
if (data_get($this->application, 'custom_labels')) {
$labels = collect(str($this->application->custom_labels)->explode(',')->toArray());
$labels = collect(str($this->application->custom_labels)->explode(','));
$labels = $labels->filter(function ($value, $key) {
return !Str::startsWith($value, 'coolify.');
});
$this->application->custom_labels = $labels->implode(',');
$this->application->save();
} else {
$labels = collect(generateLabelsApplication($this->application, $this->preview));
}