diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php
index e9d7e162a3..a2deb616b0 100755
--- a/app/Http/Controllers/AssetModelsController.php
+++ b/app/Http/Controllers/AssetModelsController.php
@@ -288,7 +288,7 @@ class AssetModelsController extends Controller
public function show($modelId = null)
{
$this->authorize('view', AssetModel::class);
- $model = AssetModel::withTrashed()->withCount('assets')->find($modelId);
+ $model = AssetModel::withTrashed()->find($modelId);
if (isset($model->id)) {
return view('models/view', compact('model'));
diff --git a/resources/views/models/view.blade.php b/resources/views/models/view.blade.php
index 76d3322998..7192e1edae 100755
--- a/resources/views/models/view.blade.php
+++ b/resources/views/models/view.blade.php
@@ -42,8 +42,8 @@
- {{ trans('general.assets') }}
- {!! ($model->assets_count > 0 ) ? ''.number_format($model->assets_count).'' : '' !!}
+ {{ trans('general.assets') }}
+ {!! ($model->assets()->AssetsForShow()->count() > 0 ) ? ''.number_format($model->assets()->AssetsForShow()->count()).'' : '' !!}