From 21ceea0aed29461df5cca80538b436eb2b23a4ef Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 23 Oct 2020 08:19:04 -0700 Subject: [PATCH 1/2] Removed extra debugging --- app/Models/Setting.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/Models/Setting.php b/app/Models/Setting.php index ece4a449c4..8384d142b5 100755 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -120,9 +120,6 @@ class Setting extends Model 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) { \Log::debug('User table and settings table DO NOT exist or DO NOT have records'); From d03d4deef94e3b15e465c9fff94bb0ea5f8b3d66 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 23 Oct 2020 11:55:53 -0700 Subject: [PATCH 2/2] Temp fix for #8561 - manager_id validation error --- app/Http/Requests/SaveUserRequest.php | 2 +- app/Models/User.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/SaveUserRequest.php b/app/Http/Requests/SaveUserRequest.php index ed44fc0939..3c706e854a 100644 --- a/app/Http/Requests/SaveUserRequest.php +++ b/app/Http/Requests/SaveUserRequest.php @@ -34,7 +34,7 @@ class SaveUserRequest extends FormRequest { $rules = [ - 'manager_id' => "nullable|exists:users,id|different:users.id" + 'manager_id' => "nullable|exists:users,id" ]; switch($this->method()) diff --git a/app/Models/User.php b/app/Models/User.php index ff886905fc..e030b23b2f 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -74,7 +74,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo 'password' => 'required|min:8', 'locale' => 'max:10|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', ];