From df72e97d7bf5e0b91f06b4f263799d429a3ce518 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Mon, 12 Feb 2024 16:15:24 +0000 Subject: [PATCH] fix: activity log org filter (#20272) * fix: activity log filters by org by default * inline * Update posthog/api/activity_log.py --- posthog/api/activity_log.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/posthog/api/activity_log.py b/posthog/api/activity_log.py index dfb4d18b0b72d..fcfe14fee754a 100644 --- a/posthog/api/activity_log.py +++ b/posthog/api/activity_log.py @@ -77,8 +77,7 @@ class ActivityLogViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet, mixins pagination_class = ActivityLogPagination def filter_queryset_by_parents_lookups(self, queryset) -> QuerySet: - team = self.team - return queryset.filter(Q(organization_id=team.organization_id) | Q(team_id=team.id)) + return queryset.filter(team_id=self.team.id) def get_queryset(self) -> QuerySet: queryset = super().get_queryset()