mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Find first record, instead of hardcoded id 1
This commit is contained in:
parent
9c4cd9c3ce
commit
cffa76e627
|
@ -294,7 +294,7 @@ class SettingsController extends Controller
|
|||
{
|
||||
|
||||
// Check if the asset exists
|
||||
if (is_null($setting = Setting::find(1))) {
|
||||
if (is_null($setting = Setting::first())) {
|
||||
// Redirect to the asset management page with error
|
||||
return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error'));
|
||||
}
|
||||
|
@ -314,7 +314,6 @@ class SettingsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
$setting->id = '1';
|
||||
|
||||
if (config('app.lock_passwords')==false) {
|
||||
$setting->site_name = e(Input::get('site_name'));
|
||||
|
|
Loading…
Reference in a new issue