fix(applications): treat zero private_key_id as deploy key (#8563)

This commit is contained in:
Andras Bacsai
2026-02-23 14:16:11 +01:00
committed by GitHub
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -990,7 +990,7 @@ class Application extends BaseModel
if (isDev() && data_get($this, 'private_key_id') === 0) {
return 'deploy_key';
}
if (data_get($this, 'private_key_id')) {
if (! is_null(data_get($this, 'private_key_id'))) {
return 'deploy_key';
} elseif (data_get($this, 'source')) {
return 'source';
@@ -0,0 +1,11 @@
<?php
use App\Models\Application;
it('treats zero private key id as deploy key', function () {
$application = new Application();
$application->private_key_id = 0;
$application->source = null;
expect($application->deploymentType())->toBe('deploy_key');
});