Skip to content

Commit

Permalink
Merge pull request #10416 from uberbrady/yank_assetlogs_from_asset_api
Browse files Browse the repository at this point in the history
Yank assetlog from eager-load clause in API query for develop
  • Loading branch information
snipe authored Dec 11, 2021
2 parents 713fbdc + ea71086 commit 503c802
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ public function index(Request $request, $audit = null)
}

$assets = Company::scopeCompanyables(Asset::select('assets.*'), 'company_id', 'assets')
->with('location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo',
'model.category', 'model.manufacturer', 'model.fieldset', 'supplier');
->with('location', 'assetstatus', 'company', 'defaultLoc','assignedTo',
'model.category', 'model.manufacturer', 'model.fieldset', 'supplier'); //it's tempting to add assetlogs here, but don't - it blows up update-heavy installations

// These are used by the API to query against specific ID numbers.
// They are also used by the individual searches on detail pages like
Expand Down

0 comments on commit 503c802

Please sign in to comment.