diff --git a/app/Services/Servers/StartupModificationService.php b/app/Services/Servers/StartupModificationService.php index c409520a0..f154c54bd 100644 --- a/app/Services/Servers/StartupModificationService.php +++ b/app/Services/Servers/StartupModificationService.php @@ -101,8 +101,7 @@ class StartupModificationService ]); } - $server->forceFill([ - 'installed' => 0, + $server->fill([ 'startup' => $data['startup'] ?? $server->startup, 'skip_scripts' => $data['skip_scripts'] ?? isset($data['skip_scripts']), 'image' => $data['docker_image'] ?? $server->image, diff --git a/tests/Integration/Services/Servers/StartupModificationServiceTest.php b/tests/Integration/Services/Servers/StartupModificationServiceTest.php index 89674f88a..84fee3be8 100644 --- a/tests/Integration/Services/Servers/StartupModificationServiceTest.php +++ b/tests/Integration/Services/Servers/StartupModificationServiceTest.php @@ -96,6 +96,9 @@ class StartupModificationServiceTest extends IntegrationTestCase $this->assertSame('sample startup', $response->startup); $this->assertSame('docker/hodor', $response->image); $this->assertTrue($response->skip_scripts); + // Make sure we don't revert back to a lurking bug that causes servers to get marked + // as not installed when you modify the startup... + $this->assertSame(1, $response->installed); } /**