mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
v5 Develop Fixed: Setup error because setting table does not exist (#6390)
* Fixed missing oauth tables during setup. * Merge remote-tracking branch 'snipe-it-upstream/develop' into develop * Merge remote-tracking branch 'snipe-it-upstream/develop' into develop Merge remote-tracking branch 'origin/develop' into develop * Fixed error during setup when settings table is not present
This commit is contained in:
parent
88b1da4260
commit
0d2eef5894
|
@ -103,12 +103,17 @@ class Setting extends Model
|
|||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @return \App\Models\Setting
|
||||
* @return \App\Models\Setting|null
|
||||
*/
|
||||
public static function getSettings()
|
||||
public static function getSettings(): ?Setting
|
||||
{
|
||||
return Cache::rememberForever(self::APP_SETTINGS_KEY, function () {
|
||||
return self::first();
|
||||
// Need for setup as no tables exist
|
||||
try {
|
||||
return self::first();
|
||||
} catch (\Throwable $th) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue