relationship fix

This commit is contained in:
2025-03-31 16:21:56 +00:00
parent 198c279abb
commit 291b45fc67
2 changed files with 3 additions and 3 deletions

View File

@@ -21,13 +21,13 @@ class RunStep implements ShouldQueue
public function handle(): void
{
$this->step->load('service.server');
$this->step->load('deployment.target.server');
$this->step->update([
'status' => DeploymentStatus::IN_PROGRESS,
'started_at' => now(),
]);
$server = $this->step->service->server;
$server = $this->step->deployment->target->server;
$ssh = Ssh::create('root', $server->ipv4)
->usePrivateKey(storage_path('private/ssh/id_ed25519'))

View File

@@ -23,7 +23,7 @@ class Deployment extends Model
return $this->hasMany(Step::class);
}
public function deployable(): MorphTo
public function target(): MorphTo
{
return $this->morphTo('target');
}