diff --git a/app/Actions/ViewService.php b/app/Actions/ViewService.php index ec57cdb76..51a60d96e 100644 --- a/app/Actions/ViewService.php +++ b/app/Actions/ViewService.php @@ -74,7 +74,12 @@ class ViewService $query->whereIn('viewable_type', $this->entityProvider->getMorphClasses($filterModels)); } - return $query->with('viewable')->skip($skipCount)->take($count)->get()->pluck('viewable'); + return $query->with('viewable') + ->skip($skipCount) + ->take($count) + ->get() + ->pluck('viewable') + ->filter(); } /** diff --git a/resources/views/settings/audit.blade.php b/resources/views/settings/audit.blade.php index 1996e1c21..c52390f73 100644 --- a/resources/views/settings/audit.blade.php +++ b/resources/views/settings/audit.blade.php @@ -63,7 +63,7 @@ @include('partials.table-user', ['user' => $activity->user, 'user_id' => $activity->user_id]) {{ $activity->type }} - + @if($activity->entity) @icon($activity->entity->getType())