Skip to content

Commit

Permalink
fix: consuming CronJobResponse when LifecycleJobResponse is nil (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud303-pthomison authored Jan 24, 2024
1 parent eca81de commit bb48d2f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions utils/qovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -2501,18 +2501,18 @@ func ToJobRequest(job qovery.JobResponse) qovery.JobRequest {
}

return qovery.JobRequest{
Name: job.LifecycleJobResponse.Name,
Description: job.LifecycleJobResponse.Description,
Cpu: Int32(job.LifecycleJobResponse.Cpu),
Memory: Int32(job.LifecycleJobResponse.Memory),
MaxNbRestart: job.LifecycleJobResponse.MaxNbRestart,
MaxDurationSeconds: job.LifecycleJobResponse.MaxDurationSeconds,
AutoPreview: Bool(job.LifecycleJobResponse.AutoPreview),
Port: job.LifecycleJobResponse.Port,
Name: job.CronJobResponse.Name,
Description: job.CronJobResponse.Description,
Cpu: Int32(job.CronJobResponse.Cpu),
Memory: Int32(job.CronJobResponse.Memory),
MaxNbRestart: job.CronJobResponse.MaxNbRestart,
MaxDurationSeconds: job.CronJobResponse.MaxDurationSeconds,
AutoPreview: Bool(job.CronJobResponse.AutoPreview),
Port: job.CronJobResponse.Port,
Source: &source,
Healthchecks: job.LifecycleJobResponse.Healthchecks,
Healthchecks: job.CronJobResponse.Healthchecks,
Schedule: &schedule,
AutoDeploy: *qovery.NewNullableBool(job.LifecycleJobResponse.AutoDeploy),
AutoDeploy: *qovery.NewNullableBool(job.CronJobResponse.AutoDeploy),
}
}
}
Expand Down

0 comments on commit bb48d2f

Please sign in to comment.