Skip to content

Commit

Permalink
fix: workaround snapshots not found check (#18425)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Nov 6, 2023
1 parent e2f9929 commit 21ba4a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion posthog/session_recordings/queries/session_replay_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def exists(self, session_id: str, team: Team) -> bool:
FROM session_replay_events
WHERE team_id = %(team_id)s
AND session_id = %(session_id)s
AND min_first_timestamp >= now() - INTERVAL %(recording_ttl_days)s DAY
-- we should check for the `ttl_days(team)` TTL here,
-- but for a shared/pinned recording
-- the TTL effectively becomes 1 year
-- and we don't know which we're dealing with
AND min_first_timestamp >= now() - INTERVAL 370 DAY
""",
{
"team_id": team.pk,
Expand Down

0 comments on commit 21ba4a2

Please sign in to comment.