From 52def1c2e4bea6c75c5cc3d659cfca6dd25bd219 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sat, 8 Jul 2017 11:53:23 -0700 Subject: [PATCH] fix --- app/Http/Controllers/DashboardController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index f1b59eb..63f91b2 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -88,7 +88,10 @@ class DashboardController extends Controller $tweet = Tweet::where('id', $request->input('tweet_id'))->first(); if($tweet) { // Calculate the previous mission status before saving this tweet - $previousMissionStatus = $tweet->mission->complete($tweet->team); + if($tweet->team) + $previousMissionStatus = $tweet->mission->complete($tweet->team); + else + $previousMissionStatus = false; $tweet->m1_transit_line_id = null; $tweet->m1_non_trimet = null;