feat: cancelling a deployment will check if new could be started.

This commit is contained in:
Andras Bacsai
2024-06-12 12:05:08 +02:00
parent 5cf6804615
commit f332a73122
3 changed files with 30 additions and 6 deletions

View File

@@ -531,7 +531,7 @@ class Application extends BaseModel
public function get_last_successful_deployment()
{
return ApplicationDeploymentQueue::where('application_id', $this->id)->where('status', 'finished')->where('pull_request_id', 0)->orderBy('created_at', 'desc')->first();
return ApplicationDeploymentQueue::where('application_id', $this->id)->where('status', ApplicationDeploymentStatus::FINISHED)->where('pull_request_id', 0)->orderBy('created_at', 'desc')->first();
}
public function get_last_days_deployments()