Skip to content

Commit

Permalink
Ignore the soft deleted assets in the eloquent query (#6824)
Browse files Browse the repository at this point in the history
  • Loading branch information
inietov authored and snipe committed Mar 14, 2019
1 parent e3e0d57 commit 8c65214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public function index(Request $request)
*/
public function showByTag($tag)
{
if ($asset = Asset::with('assetstatus')->with('assignedTo')->withTrashed()->where('asset_tag',$tag)->first()) {
if ($asset = Asset::with('assetstatus')->with('assignedTo')->where('asset_tag',$tag)->first()) {
$this->authorize('view', $asset);
return (new AssetsTransformer)->transformAsset($asset);
}
Expand Down

0 comments on commit 8c65214

Please sign in to comment.