Fix activity log query (#1258)

This commit is contained in:
Boy132 2025-04-22 08:28:24 +02:00 committed by GitHub
parent ee838316e6
commit 0e2ab4b711
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,8 +30,7 @@ class ActivityResource extends Resource
/** @var Server $server */
$server = Filament::getTenant();
return $server->activity()
->getQuery()
return ActivityLog::whereHas('subjects', fn (Builder $query) => $query->where('subject_id', $server->id))
->whereNotIn('activity_logs.event', ActivityLog::DISABLED_EVENTS)
->when(config('activity.hide_admin_activity'), function (Builder $builder) use ($server) {
// We could do this with a query and a lot of joins, but that gets pretty