Skip to content

Commit

Permalink
Use ViewSet instead of GenericViewSet
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Apr 25, 2024
1 parent 350f046 commit 569b873
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions posthog/api/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from rest_framework import request, response, viewsets
from rest_framework.decorators import action
from rest_framework.exceptions import ValidationError
from rest_framework.settings import api_settings
from rest_framework_csv import renderers as csvrenderers

from posthog.api.routing import TeamAndOrgViewSetMixin
from posthog.hogql.database.schema.sessions import get_lazy_session_table_properties, get_lazy_session_table_values
Expand All @@ -17,10 +15,9 @@

class SessionViewSet(
TeamAndOrgViewSetMixin,
viewsets.GenericViewSet,
viewsets.ViewSet,
):
scope_object = "query"
renderer_classes = tuple(api_settings.DEFAULT_RENDERER_CLASSES) + (csvrenderers.PaginatedCSVRenderer,)
throttle_classes = [ClickHouseBurstRateThrottle, ClickHouseSustainedRateThrottle]

@action(methods=["GET"], detail=False)
Expand Down

0 comments on commit 569b873

Please sign in to comment.