A free open source IT asset/license management system
Fixed #8526 - skip cache for setup check
snipee80b63b5c1d2
diff --git a/app/Models/Setting.php b/app/Models/Setting.phpindex 0d819ac818..ece4a449c4 100755--- a/app/Models/Setting.php+++ b/app/Models/Setting.php@@ -117,18 +117,20 @@ class Setting extends Model*/public static function setupCompleted(): bool{- return Cache::rememberForever(self::SETUP_CHECK_KEY, function () {try {$usercount = User::withTrashed()->count();$settingsCount = self::count();-+ \Log::debug('User table and settings table exist and have records.');+ \Log::debug('Settings: '.$settingsCount );+ \Log::debug('Users: '.$usercount );return $usercount > 0 && $settingsCount > 0;} catch (\Throwable $th) {- // Catche the error if the tables dont exit- }+ \Log::debug('User table and settings table DO NOT exist or DO NOT have records');+ // Catch the error if the tables dont exit+ return false;+ }+- return false;- });}/**