mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
8aae2b46cd
|
@ -34,7 +34,7 @@ class SaveUserRequest extends FormRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
$rules = [
|
$rules = [
|
||||||
'manager_id' => "nullable|exists:users,id|different:users.id"
|
'manager_id' => "nullable|exists:users,id"
|
||||||
];
|
];
|
||||||
|
|
||||||
switch($this->method())
|
switch($this->method())
|
||||||
|
|
|
@ -120,9 +120,6 @@ class Setting extends Model
|
||||||
try {
|
try {
|
||||||
$usercount = User::withTrashed()->count();
|
$usercount = User::withTrashed()->count();
|
||||||
$settingsCount = self::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;
|
return $usercount > 0 && $settingsCount > 0;
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
\Log::debug('User table and settings table DO NOT exist or DO NOT have records');
|
\Log::debug('User table and settings table DO NOT exist or DO NOT have records');
|
||||||
|
|
|
@ -74,7 +74,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
'password' => 'required|min:8',
|
'password' => 'required|min:8',
|
||||||
'locale' => 'max:10|nullable',
|
'locale' => 'max:10|nullable',
|
||||||
'website' => 'url|nullable',
|
'website' => 'url|nullable',
|
||||||
'manager_id' => 'nullable|exists:users,id|different:users.id',
|
'manager_id' => 'nullable|exists:users,id',
|
||||||
'location_id' => 'exists:locations,id|nullable',
|
'location_id' => 'exists:locations,id|nullable',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue