Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Surveys): Fix out of bounds access for iteration_start_dates #24198

Merged
merged 4 commits into from
Aug 5, 2024

Conversation

Phanatic
Copy link
Contributor

@Phanatic Phanatic commented Aug 5, 2024

Problem

Fixes sentry error : https://posthog.sentry.io/issues/5515122376/?project=1899813

Changes

Added a guard to access the iteration_start_dates so we don't underflow or overflow the index.

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Automated tests

Copy link

sentry-io bot commented Aug 5, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: posthog/tasks/update_survey_iteration.py

Function Unhandled Issue
_update_survey_iteration IndexError: list index out of range posthog.tasks...
Event Count: 3.0k

Did you find this useful? React with a 👍 or 👎

@Phanatic Phanatic requested a review from a team August 5, 2024 17:20
@Phanatic Phanatic enabled auto-merge (squash) August 5, 2024 17:26
Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 🔥 🔥

@Phanatic Phanatic merged commit e79bcf4 into master Aug 5, 2024
86 checks passed
@Phanatic Phanatic deleted the fix-survey-task branch August 5, 2024 18:34
silentninja pushed a commit to silentninja/posthog that referenced this pull request Aug 8, 2024
…tHog#24198)

Fixes sentry error : posthog.sentry.io/issues/5515122376?project=1899813
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants