From 22028e23e3d724b7d07f11b41cacd9284687fde9 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 3 May 2023 08:53:00 +0200 Subject: [PATCH] redirect if no deployment found --- app/Http/Controllers/ApplicationController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php index 877ca3254..f477549db 100644 --- a/app/Http/Controllers/ApplicationController.php +++ b/app/Http/Controllers/ApplicationController.php @@ -57,7 +57,13 @@ class ApplicationController extends Controller return redirect()->route('dashboard'); } $activity = Activity::where('properties->type_uuid', '=', $deployment_uuid)->first(); - + if (!$activity) { + return redirect()->route('project.application.deployments', [ + 'project_uuid' => $project->uuid, + 'environment_name' => $environment->name, + 'application_uuid' => $application->uuid, + ]); + } return view('project.application.deployment', [ 'application' => $application, 'activity' => $activity,