Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Sep 17, 2023
1 parent 7b0191b commit e537be3
Show file tree
Hide file tree
Showing 5 changed files with 3,732 additions and 17 deletions.
3 changes: 1 addition & 2 deletions posthog/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from posthog.batch_exports import http as batch_exports
from posthog.settings import EE_AVAILABLE
from posthog.warehouse.api import saved_query, table, view_link

from . import (
activity_log,
annotation,
Expand Down Expand Up @@ -41,6 +40,7 @@
)
from .dashboards import dashboard, dashboard_templates
from .data_management import DataManagementViewSet
from ..session_recordings.session_recording_api import SessionRecordingViewSet


@decorators.api_view(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"])
Expand Down Expand Up @@ -212,7 +212,6 @@ def api_not_found(request):
from posthog.api.event import EventViewSet, LegacyEventViewSet # noqa: E402
from posthog.api.insight import InsightViewSet # noqa: E402
from posthog.api.person import LegacyPersonViewSet, PersonViewSet # noqa: E402
from posthog.session_recordings.session_recording_api import SessionRecordingViewSet # noqa: E402

# Legacy endpoints CH (to be removed eventually)
router.register(r"cohort", LegacyCohortViewSet, basename="cohort")
Expand Down
2 changes: 1 addition & 1 deletion posthog/api/sharing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from posthog.api.exports import ExportedAssetSerializer
from posthog.api.insight import InsightSerializer
from posthog.api.routing import StructuredViewSetMixin
from posthog.session_recordings.session_recording_api import SessionRecordingSerializer
from posthog.models import SharingConfiguration, Team
from posthog.models.activity_logging.activity_log import log_activity, Detail, Change
from posthog.models.dashboard import Dashboard
Expand All @@ -24,6 +23,7 @@
from posthog.models import SessionRecording
from posthog.models.user import User
from posthog.permissions import ProjectMembershipNecessaryPermissions, TeamMemberAccessPermission
from posthog.session_recordings.session_recording_api import SessionRecordingSerializer
from posthog.user_permissions import UserPermissions
from posthog.utils import render_template

Expand Down
2 changes: 1 addition & 1 deletion posthog/session_recordings/session_recording_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def _snapshots_v2(self, request: request.Request):
response_data["sources"] = sources

elif source == "realtime":
snapshots = get_realtime_snapshots(team_id=self.team.pk, session_id=recording.session_id) or []
snapshots = get_realtime_snapshots(team_id=self.team.pk, session_id=str(recording.session_id)) or []

event_properties["source"] = "realtime"
event_properties["snapshots_length"] = len(snapshots)
Expand Down
Loading

0 comments on commit e537be3

Please sign in to comment.