Ignore the soft deleted assets in the eloquent query (#6824)

This commit is contained in:
Ivan Nieto 2019-03-13 21:14:30 -06:00 committed by snipe
parent e3e0d57f56
commit 8c65214b1f

View file

@ -279,7 +279,7 @@ class AssetsController extends Controller
*/ */
public function showByTag($tag) 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); $this->authorize('view', $asset);
return (new AssetsTransformer)->transformAsset($asset); return (new AssetsTransformer)->transformAsset($asset);
} }