<s> from __future__ import absolute_import <EOL> from sentry . api . bases import OrganizationMemberEndpoint <EOL> from sentry . api . paginator import DateTimePaginator <EOL> from sentry . api . serializers import serialize , OrganizationActivitySerializer <EOL> from sentry . models import Activity , OrganizationMemberTeam , Project <EOL> class OrganizationActivityEndpoint ( OrganizationMemberEndpoint ) : <EOL> def get ( self , request , organization , member ) : <EOL> queryset = Activity . objects . filter ( <EOL> project__in = Project . objects . filter ( <EOL> organization = organization , <EOL> team__in = OrganizationMemberTeam . objects . filter ( <EOL> organizationmember = member , <EOL> ) . values ( '<STR_LIT>' ) <EOL> ) <EOL> ) . select_related ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:user>' ) <EOL> return self . paginate ( <EOL> request = request , <EOL> queryset = queryset , <EOL> paginator_cls = DateTimePaginator , <EOL> order_by = '<STR_LIT>' , <EOL> on_results = lambda x : serialize ( <EOL> x , request . user , OrganizationActivitySerializer ( ) <EOL> ) , <EOL> ) </s>
