Do not mark a server as "not installed" when updating it's startup arguments

This commit is contained in:
Dane Everitt 2020-10-12 20:12:34 -07:00
parent 2eccfcc1e3
commit 1ad8b3f37d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 4 additions and 2 deletions

View file

@ -101,8 +101,7 @@ class StartupModificationService
]); ]);
} }
$server->forceFill([ $server->fill([
'installed' => 0,
'startup' => $data['startup'] ?? $server->startup, 'startup' => $data['startup'] ?? $server->startup,
'skip_scripts' => $data['skip_scripts'] ?? isset($data['skip_scripts']), 'skip_scripts' => $data['skip_scripts'] ?? isset($data['skip_scripts']),
'image' => $data['docker_image'] ?? $server->image, 'image' => $data['docker_image'] ?? $server->image,

View file

@ -96,6 +96,9 @@ class StartupModificationServiceTest extends IntegrationTestCase
$this->assertSame('sample startup', $response->startup); $this->assertSame('sample startup', $response->startup);
$this->assertSame('docker/hodor', $response->image); $this->assertSame('docker/hodor', $response->image);
$this->assertTrue($response->skip_scripts); $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);
} }
/** /**