From 342cc10bc24eefced172495f8840b6b3214031d3 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 3 May 2022 09:04:44 +1000 Subject: [PATCH] Check is_large flag when creating a new company --- app/Http/Controllers/CompanyController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index 78130ef55419..c780d66f3007 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -232,7 +232,7 @@ class CompanyController extends BaseController 'notifications' => CompanySettings::notificationDefaults(), ]); - if(auth()->user()->company()->account->companies()->where('is_large', 1)->exists()) + if($company->account->companies()->where('is_large', 1)->exists()) { $company->account->companies()->update(['is_large' => true]); }