Skip to content

Commit 2219219

Browse files
committed
fix: edit is_build_server_enabled upon creating application on other application type
1 parent 9ec3233 commit 2219219

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/Http/Controllers/Api/ApplicationsController.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,6 @@ private function create_application(Request $request, $type)
745745
$application->destination_type = $destination->getMorphClass();
746746
$application->environment_id = $environment->id;
747747
$application->settings->is_build_server_enabled = $useBuildServer;
748-
749748
$application->save();
750749
$application->refresh();
751750
if (! $application->settings->is_container_label_readonly_enabled) {
@@ -842,6 +841,7 @@ private function create_application(Request $request, $type)
842841
$application->environment_id = $environment->id;
843842
$application->source_type = $githubApp->getMorphClass();
844843
$application->source_id = $githubApp->id;
844+
$application->settings->is_build_server_enabled = $useBuildServer;
845845
$application->save();
846846
$application->refresh();
847847
if (! $application->settings->is_container_label_readonly_enabled) {
@@ -934,6 +934,7 @@ private function create_application(Request $request, $type)
934934
$application->destination_id = $destination->id;
935935
$application->destination_type = $destination->getMorphClass();
936936
$application->environment_id = $environment->id;
937+
$application->settings->is_build_server_enabled = $useBuildServer;
937938
$application->save();
938939
$application->refresh();
939940
if (! $application->settings->is_container_label_readonly_enabled) {
@@ -1013,7 +1014,7 @@ private function create_application(Request $request, $type)
10131014
$application->destination_id = $destination->id;
10141015
$application->destination_type = $destination->getMorphClass();
10151016
$application->environment_id = $environment->id;
1016-
1017+
$application->settings->is_build_server_enabled = $useBuildServer;
10171018
$application->git_repository = 'coollabsio/coolify';
10181019
$application->git_branch = 'main';
10191020
$application->save();
@@ -1071,7 +1072,7 @@ private function create_application(Request $request, $type)
10711072
$application->destination_id = $destination->id;
10721073
$application->destination_type = $destination->getMorphClass();
10731074
$application->environment_id = $environment->id;
1074-
1075+
$application->settings->is_build_server_enabled = $useBuildServer;
10751076
$application->git_repository = 'coollabsio/coolify';
10761077
$application->git_branch = 'main';
10771078
$application->save();

0 commit comments

Comments
 (0)