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;