From e2c0f01a10bb22c7ccde50c6cd169b263786d93a Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Feb 2019 01:26:11 -0800 Subject: [PATCH] Fixed #6367 - pass table name and column_id to scopeCompanyables Solves error: Integrity constraint violation: 1052 Column 'company_id' in where clause is ambiguous --- app/Http/Controllers/Api/AssetsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index cf5e398d2..d98840996 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -353,7 +353,7 @@ class AssetsController extends Controller 'assets.assigned_to', 'assets.assigned_type', 'assets.status_id' - ])->with('model', 'assetstatus', 'assignedTo')->NotArchived()); + ])->with('model', 'assetstatus', 'assignedTo')->NotArchived(),'company_id', 'assets'); if ($request->has('assetStatusType') && $request->input('assetStatusType') === 'RTD') { $assets = $assets->RTD();