fix: only enable Sentinel for new servers

This commit is contained in:
Andras Bacsai
2024-10-17 10:04:38 +02:00
parent 8c53af088e
commit f600c1b37d
2 changed files with 9 additions and 1 deletions

View File

@@ -55,6 +55,14 @@ class ServerSetting extends Model
'docker_cleanup_threshold' => 'integer',
'sentinel_token' => 'encrypted',
];
protected static function booted()
{
static::creating(function ($setting) {
$setting->is_sentinel_enabled = true;
});
}
public function server()
{
return $this->belongsTo(Server::class);