feat: Add pull_request_id filter to get_last_successful_deployment method in Application model

This commit is contained in:
Andras Bacsai 2024-05-17 15:28:54 +02:00
parent 3281502c25
commit 73bc7b045e

View File

@ -459,7 +459,7 @@ public function isDeploymentInprogress()
}
public function get_last_successful_deployment()
{
return ApplicationDeploymentQueue::where('application_id', $this->id)->where('status', 'finished')->orderBy('created_at', 'desc')->first();
return ApplicationDeploymentQueue::where('application_id', $this->id)->where('status', 'finished')->where('pull_request_id', 0)->orderBy('created_at', 'desc')->first();
}
public function get_last_days_deployments()
{