From 73bc7b045e8d90678ac9b6c1f649d823fd37463b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 17 May 2024 15:28:54 +0200 Subject: [PATCH] feat: Add pull_request_id filter to get_last_successful_deployment method in Application model --- app/Models/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Application.php b/app/Models/Application.php index c4a6a18e2..3d0b92aaf 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -459,7 +459,7 @@ class Application extends BaseModel } 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() {