From b59f4006ed10866df1986536cccc8e6e25d16834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 2 Mar 2022 15:50:52 +0300 Subject: [PATCH] finish update console only set company for modules.. --- app/Console/Commands/FinishUpdate.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/FinishUpdate.php b/app/Console/Commands/FinishUpdate.php index 93dd42e33..0635dea21 100644 --- a/app/Console/Commands/FinishUpdate.php +++ b/app/Console/Commands/FinishUpdate.php @@ -47,17 +47,19 @@ class FinishUpdate extends Command throw new \Exception(trans('modules.errors.finish', ['module' => $alias])); } - $company = company($company_id); + if ($alias != 'core') { + $company = company($company_id); - if (empty($company)) { - return; - } + if (empty($company)) { + return; + } - $company->makeCurrent(); + $company->makeCurrent(); - // Set locale for modules - if (($alias != 'core') && !empty($company->locale)) { - app()->setLocale($company->locale); + // Set locale for modules + if (empty($company->locale)) { + app()->setLocale($company->locale); + } } // Disable model cache during update