Remove scopeCompanyables call from AssetsController@selectlist

This commit is contained in:
Marcus Moore 2023-06-21 17:21:36 -07:00
parent effd969284
commit 0a5e1e3190
No known key found for this signature in database
2 changed files with 2 additions and 4 deletions

View file

@ -477,7 +477,7 @@ class AssetsController extends Controller
public function selectlist(Request $request)
{
$assets = Company::scopeCompanyables(Asset::select([
$assets = Asset::select([
'assets.id',
'assets.name',
'assets.asset_tag',
@ -485,7 +485,7 @@ class AssetsController extends Controller
'assets.assigned_to',
'assets.assigned_type',
'assets.status_id',
])->with('model', 'assetstatus', 'assignedTo')->NotArchived(), 'company_id', 'assets');
])->with('model', 'assetstatus', 'assignedTo')->NotArchived();
if ($request->filled('assetStatusType') && $request->input('assetStatusType') === 'RTD') {
$assets = $assets->RTD();

View file

@ -33,8 +33,6 @@ class AssetsForSelectListTest extends TestCase
public function testAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled()
{
$this->markTestIncomplete();
[$companyA, $companyB] = Company::factory()->count(2)->create();
$assetA = Asset::factory()->for($companyA)->create(['asset_tag' => '0001']);